summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2015-06-06 14:11:16 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-09 23:22:28 +0300
commitab80b19bb99933df415817370a64ac7e7c688896 (patch)
tree8515cddd7c09f14cc523bcf23a69a17695abef64 /drivers/media/dvb-frontends
parent4347df6a7f7d6d0641523e595df93ddb63990bd1 (diff)
downloadlinux-ab80b19bb99933df415817370a64ac7e7c688896.tar.xz
[media] tda10071: add missing error status when probe() fails
We must return -ENODEV error on case probe() fails to detect chip. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/tda10071.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c
index 31328540e5c4..1470a5d63f58 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -1348,18 +1348,30 @@ static int tda10071_probe(struct i2c_client *client,
/* chip ID */
ret = tda10071_rd_reg(dev, 0xff, &u8tmp);
- if (ret || u8tmp != 0x0f)
+ if (ret)
+ goto err_kfree;
+ if (u8tmp != 0x0f) {
+ ret = -ENODEV;
goto err_kfree;
+ }
/* chip type */
ret = tda10071_rd_reg(dev, 0xdd, &u8tmp);
- if (ret || u8tmp != 0x00)
+ if (ret)
+ goto err_kfree;
+ if (u8tmp != 0x00) {
+ ret = -ENODEV;
goto err_kfree;
+ }
/* chip version */
ret = tda10071_rd_reg(dev, 0xfe, &u8tmp);
- if (ret || u8tmp != 0x01)
+ if (ret)
goto err_kfree;
+ if (u8tmp != 0x01) {
+ ret = -ENODEV;
+ goto err_kfree;
+ }
/* create dvb_frontend */
memcpy(&dev->fe.ops, &tda10071_ops, sizeof(struct dvb_frontend_ops));