|
@@ -2259,7 +2259,8 @@ static int try_set_ext_ctrls(struct v4l2_fh *fh, struct v4l2_ctrl_handler *hdl,
|
|
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)
|
|
if (!helpers)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|