Commit 2b43665f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] usbvision: return valid error in usbvision_register_video()

Don't return -1, return a proper error code.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fd95870d
...@@ -1304,6 +1304,8 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision) ...@@ -1304,6 +1304,8 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
/* register video4linux devices */ /* register video4linux devices */
static int usbvision_register_video(struct usb_usbvision *usbvision) static int usbvision_register_video(struct usb_usbvision *usbvision)
{ {
int res = -ENOMEM;
/* Video Device: */ /* Video Device: */
usbvision_vdev_init(usbvision, &usbvision->vdev, usbvision_vdev_init(usbvision, &usbvision->vdev,
&usbvision_video_template, "USBVision Video"); &usbvision_video_template, "USBVision Video");
...@@ -1330,7 +1332,7 @@ static int usbvision_register_video(struct usb_usbvision *usbvision) ...@@ -1330,7 +1332,7 @@ static int usbvision_register_video(struct usb_usbvision *usbvision)
"USBVision[%d]: video_register_device() failed\n", "USBVision[%d]: video_register_device() failed\n",
usbvision->nr); usbvision->nr);
usbvision_unregister_video(usbvision); usbvision_unregister_video(usbvision);
return -1; return res;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment