Commit b45e34f2 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] em28xx-dvb: remove one level of identation at fini callback

Simplify the logic a little by removing one level of identation.
Also, it only makes sense to print something if the .fini callback
is actually doing something.
Reviewed-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 47677e51
...@@ -1543,6 +1543,9 @@ static inline void prevent_sleep(struct dvb_frontend_ops *ops) ...@@ -1543,6 +1543,9 @@ static inline void prevent_sleep(struct dvb_frontend_ops *ops)
static int em28xx_dvb_fini(struct em28xx *dev) static int em28xx_dvb_fini(struct em28xx *dev)
{ {
struct em28xx_dvb *dvb;
struct i2c_client *client;
if (dev->is_audio_only) { if (dev->is_audio_only) {
/* Shouldn't initialize IR for this interface */ /* Shouldn't initialize IR for this interface */
return 0; return 0;
...@@ -1553,11 +1556,13 @@ static int em28xx_dvb_fini(struct em28xx *dev) ...@@ -1553,11 +1556,13 @@ static int em28xx_dvb_fini(struct em28xx *dev)
return 0; return 0;
} }
if (!dev->dvb)
return 0;
em28xx_info("Closing DVB extension"); em28xx_info("Closing DVB extension");
if (dev->dvb) { dvb = dev->dvb;
struct em28xx_dvb *dvb = dev->dvb; client = dvb->i2c_client_tuner;
struct i2c_client *client = dvb->i2c_client_tuner;
em28xx_uninit_usb_xfer(dev, EM28XX_DIGITAL_MODE); em28xx_uninit_usb_xfer(dev, EM28XX_DIGITAL_MODE);
...@@ -1580,7 +1585,6 @@ static int em28xx_dvb_fini(struct em28xx *dev) ...@@ -1580,7 +1585,6 @@ static int em28xx_dvb_fini(struct em28xx *dev)
kfree(dvb); kfree(dvb);
dev->dvb = NULL; dev->dvb = NULL;
kref_put(&dev->ref, em28xx_free_device); kref_put(&dev->ref, em28xx_free_device);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment