diff options
Diffstat (limited to 'linux/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c')
-rw-r--r-- | linux/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c index 925c8599f..1978f482c 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c @@ -178,19 +178,22 @@ int dibusb_fe_init(struct usb_dibusb* dib) break; } } - if (dib->fe->ops->sleep != NULL) - dib->fe_sleep = dib->fe->ops->sleep; - dib->fe->ops->sleep = dibusb_hw_sleep; - - if (dib->fe->ops->init != NULL ) - dib->fe_init = dib->fe->ops->init; - dib->fe->ops->init = dibusb_hw_wakeup; + /* if a frontend was found */ + if (dib->fe != NULL) { + if (dib->fe->ops->sleep != NULL) + dib->fe_sleep = dib->fe->ops->sleep; + dib->fe->ops->sleep = dibusb_hw_sleep; + + if (dib->fe->ops->init != NULL ) + dib->fe_init = dib->fe->ops->init; + dib->fe->ops->init = dibusb_hw_wakeup; - /* setting the default tuner */ - dib->tuner = dib->dibdev->dev_cl->tuner; + /* setting the default tuner */ + dib->tuner = dib->dibdev->dev_cl->tuner; - /* check which tuner is mounted on this device, in case this is unsure */ - dibusb_tuner_quirk(dib); + /* check which tuner is mounted on this device, in case this is unsure */ + dibusb_tuner_quirk(dib); + } } if (dib->fe == NULL) { err("A frontend driver was not found for device '%s'.", @@ -205,6 +208,7 @@ int dibusb_fe_init(struct usb_dibusb* dib) return -ENODEV; } } + return 0; } |