diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-27 16:27:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-27 16:57:43 -0300 |
commit | 52841e5e145afdf5cc070863c383f41db8472575 (patch) | |
tree | 81f7791da8100f9fb2d517febfaa6fe8e79e067c /drivers/media/usb/cx231xx/cx231xx-cards.c | |
parent | 4d2a7d3509f52106c50007c1dc0b8d79e8040128 (diff) | |
download | blackbird-op-linux-52841e5e145afdf5cc070863c383f41db8472575.tar.gz blackbird-op-linux-52841e5e145afdf5cc070863c383f41db8472575.zip |
[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.c | 6 |
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 75b24b711531..db69307d86ae 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.*/ |