提交 bd610c5a 编写于 作者: C Christophe JAILLET 提交者: Felipe Balbi

usb: gadget: uvc: Fix return value in case of error

If this memory allocation fail, we will return 0, which means success.
Return -ENOMEM instead.
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 63196e98
......@@ -2023,7 +2023,7 @@ static int uvcg_streaming_class_allow_link(struct config_item *src,
if (!data) {
kfree(*class_array);
*class_array = NULL;
ret = PTR_ERR(data);
ret = -ENOMEM;
goto unlock;
}
cl_arr = *class_array;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册