using kmemdup_array instead of kmemdup ,as it is more
readable and matches the intent of the api.
tested with w=1, no new warnings introduced.
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
* Now limit the number of configs to the real number of
* found properties.
*/
- *configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);
+ *configs = kmemdup_array(cfg, ncfg, sizeof(unsigned long), GFP_KERNEL);
if (!*configs) {
ret = -ENOMEM;
goto out;