mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 14:12:51 +00:00
[media] usbvision: return valid error in usbvision_register_video()
Don't return -1, return a proper error code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
fd95870d1b
commit
2b43665ffb
@ -1304,6 +1304,8 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
|
||||
/* register video4linux devices */
|
||||
static int usbvision_register_video(struct usb_usbvision *usbvision)
|
||||
{
|
||||
int res = -ENOMEM;
|
||||
|
||||
/* Video Device: */
|
||||
usbvision_vdev_init(usbvision, &usbvision->vdev,
|
||||
&usbvision_video_template, "USBVision Video");
|
||||
@ -1330,7 +1332,7 @@ static int usbvision_register_video(struct usb_usbvision *usbvision)
|
||||
"USBVision[%d]: video_register_device() failed\n",
|
||||
usbvision->nr);
|
||||
usbvision_unregister_video(usbvision);
|
||||
return -1;
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user