Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd610c5a authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Felipe Balbi
Browse files

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 63196e98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;