Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e7db038 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f3d27f34
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);