We must return -ENODEV error on case probe() fails to detect chip. Signed-off-by: Antti Palosaari <crope@xxxxxx> --- drivers/media/dvb-frontends/tda10071.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index 3132854..1470a5d 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)); -- http://palosaari.fi/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html