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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Родитель
63196e9896
Коммит
bd610c5aa9
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче