summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2013-06-19 16:57:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-21 11:33:06 -0300
commit5e7db0389fd05ba8721df3978b76156917cb4256 (patch)
tree9b3f5858e47710e1dc445addd20e5b0da2c64008 /drivers/staging
parentf3d27f34fdd7701e499617d2c1d94480a98f6d07 (diff)
downloadlinux-5e7db0389fd05ba8721df3978b76156917cb4256.tar.gz
linux-5e7db0389fd05ba8721df3978b76156917cb4256.tar.xz
[media] go7007: fix return 0 for unsupported devices in go7007_usb_probe()
probe() should not return 0 for unsupported devices, but go7007_usb_probe() does. The patch fixes it to return -ENODEV. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/go7007/go7007-usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
index 50066e01a6ed..46ed83245035 100644
--- a/drivers/staging/media/go7007/go7007-usb.c
+++ b/drivers/staging/media/go7007/go7007-usb.c
@@ -1124,7 +1124,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
case GO7007_BOARDID_LIFEVIEW_LR192:
printk(KERN_ERR "go7007-usb: The Lifeview TV Walker Ultra "
"is not supported. Sorry!\n");
- return 0;
+ return -ENODEV;
name = "Lifeview TV Walker Ultra";
board = &board_lifeview_lr192;
break;
@@ -1140,7 +1140,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
default:
printk(KERN_ERR "go7007-usb: unknown board ID %d!\n",
(unsigned int)id->driver_info);
- return 0;
+ return -ENODEV;
}
go = go7007_alloc(&board->main_info, &intf->dev);