Instead of failing silent give a hint what went wrong. Signed-off-by: Uwe Kleine-König <uwe@xxxxxxxxxxxxxxxxx> --- drivers/media/usb/dvb-usb-v2/af9035.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index de52309eaaab..f5701fab192c 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -211,13 +211,19 @@ static int af9035_add_i2c_dev(struct dvb_usb_device *d, const char *type, /* register I2C device */ client = i2c_new_device(adapter, &board_info); - if (client == NULL || client->dev.driver == NULL) { + if (client == NULL) { + dev_err(&intf->dev, "failed to register i2c device\n"); + ret = -ENODEV; + goto err; + } else if (client->dev.driver == NULL) { + dev_err(&intf->dev, "no driver for i2c device (type=%s)\n", type); ret = -ENODEV; goto err; } /* increase I2C driver usage count */ if (!try_module_get(client->dev.driver->owner)) { + dev_err(&intf->dev, "failed to get module for i2c driver\n"); i2c_unregister_device(client); ret = -ENODEV; goto err; -- 2.20.1