Merge tag 'renesas-fixes-for-v4.18' of https://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / sound / soc / rockchip / rk3399_gru_sound.c
index f184168f9a416191368ae19a3279826fb6831c7d..f2a51ae2b674d5a3107ab568bdc1842d6e746145 100644 (file)
@@ -462,7 +462,7 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
        num_routes = 0;
        for (i = 0; i < ARRAY_SIZE(rockchip_routes); i++)
                num_routes += rockchip_routes[i].num_routes;
-       routes = devm_kzalloc(dev, num_routes * sizeof(*routes),
+       routes = devm_kcalloc(dev, num_routes, sizeof(*routes),
                              GFP_KERNEL);
        if (!routes)
                return -ENOMEM;