diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 3e0a72dec994..bf62b105b49d 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -2036,7 +2036,8 @@ int v4l2_g_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct v4l2_ext_controls *cs | |||
2036 | return class_check(hdl, cs->ctrl_class); | 2036 | return class_check(hdl, cs->ctrl_class); |
2037 | 2037 | ||
2038 | if (cs->count > ARRAY_SIZE(helper)) { | 2038 | if (cs->count > ARRAY_SIZE(helper)) { |
2039 | helpers = kmalloc(sizeof(helper[0]) * cs->count, GFP_KERNEL); | 2039 | helpers = kmalloc_array(cs->count, sizeof(helper[0]), |
2040 | GFP_KERNEL); | ||
2040 | if (helpers == NULL) | 2041 | if (helpers == NULL) |
2041 | return -ENOMEM; | 2042 | return -ENOMEM; |
2042 | } | 2043 | } |