summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cx231xx/cx231xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-27 19:27:32 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-27 19:57:43 (GMT)
commit52841e5e145afdf5cc070863c383f41db8472575 (patch)
tree81f7791da8100f9fb2d517febfaa6fe8e79e067c /drivers/media/usb/cx231xx/cx231xx-cards.c
parent4d2a7d3509f52106c50007c1dc0b8d79e8040128 (diff)
downloadlinux-52841e5e145afdf5cc070863c383f41db8472575.tar.xz
[media] cx231xx: return an error if it can't read PCB config
Instead of using some random value, return an error if the PCB config is not available or doesn't match a know profile Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-cards.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-cards.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 75b24b7..db69307 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -997,7 +997,11 @@ static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev,
dev->cx231xx_gpio_i2c_write = cx231xx_gpio_i2c_write;
/* Query cx231xx to find what pcb config it is related to */
- initialize_cx231xx(dev);
+ retval = initialize_cx231xx(dev);
+ if (retval < 0) {
+ cx231xx_errdev("Failed to read PCB config\n");
+ return retval;
+ }
/*To workaround error number=-71 on EP0 for VideoGrabber,
need set alt here.*/