diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-07-20 09:59:30 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-11 06:50:08 -0300 |
commit | 2b43665ffbca7fe38617442cf731332afc94ead2 (patch) | |
tree | 163b448649b92b343f6b3db7f14acb6616e9189c | |
parent | fd95870d1bd6d7da7e7d0c550bfaae6d76f0799f (diff) | |
download | op-kernel-dev-2b43665ffbca7fe38617442cf731332afc94ead2.zip op-kernel-dev-2b43665ffbca7fe38617442cf731332afc94ead2.tar.gz |
[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>
-rw-r--r-- | drivers/media/usb/usbvision/usbvision-video.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index ea67c8c..82a65a4 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c @@ -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; } /* |