|
@@ -2036,7 +2036,8 @@ int v4l2_g_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ext_controls *cs
|
|
return class_check(hdl, cs->ctrl_class);
|
|
return class_check(hdl, cs->ctrl_class);
|
|
|
|
|
|
if (cs->count > ARRAY_SIZE(helper)) {
|
|
if (cs->count > ARRAY_SIZE(helper)) {
|
|
- helpers = kmalloc(sizeof(helper[0]) * cs->count, GFP_KERNEL);
|
|
|
|
|
|
+ helpers = kmalloc_array(cs->count, sizeof(helper[0]),
|
|
|
|
+ GFP_KERNEL);
|
|
if (helpers == NULL)
|
|
if (helpers == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|