From: Hans Verkuil <hans.verkuil@xxxxxxxxx> Don't return -1, return a proper error code. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> --- drivers/media/usb/usbvision/usbvision-video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } /* -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html