diff options
author | 2014-11-19 19:20:51 -0300 | |
---|---|---|
committer | 2014-11-25 12:07:33 -0200 | |
commit | 5ed0cf8800c4da58e1e501f7143154897d34e9c2 (patch) | |
tree | 547e529be54c117f71c45acf91fcbac87b12da8c /drivers/media/dvb-frontends/m88ds3103.c | |
parent | [media] DVB-frontends: Deletion of unnecessary checks before the function cal... (diff) | |
download | linux-5ed0cf8800c4da58e1e501f7143154897d34e9c2.tar.gz linux-5ed0cf8800c4da58e1e501f7143154897d34e9c2.tar.bz2 linux-5ed0cf8800c4da58e1e501f7143154897d34e9c2.zip |
[media] m88ds3103: One function call less in m88ds3103_init() after error detection
GIT_AUTHOR_DATE=1416472158
The release_firmware() function was called in some cases by the
m88ds3103_init() function during error handling even if the passed variable
contained still a null pointer. This implementation detail could be improved
by the introduction of another jump label.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/m88ds3103.c')
-rw-r--r-- | drivers/media/dvb-frontends/m88ds3103.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c index 843e669a3d7c..ba4ee0b48834 100644 --- a/drivers/media/dvb-frontends/m88ds3103.c +++ b/drivers/media/dvb-frontends/m88ds3103.c @@ -640,7 +640,7 @@ static int m88ds3103_init(struct dvb_frontend *fe) ret = m88ds3103_wr_reg(priv, 0xb2, 0x01); if (ret) - goto err; + goto error_fw_release; for (remaining = fw->size; remaining > 0; remaining -= (priv->cfg->i2c_wr_max - 1)) { @@ -654,13 +654,13 @@ static int m88ds3103_init(struct dvb_frontend *fe) dev_err(&priv->i2c->dev, "%s: firmware download failed=%d\n", KBUILD_MODNAME, ret); - goto err; + goto error_fw_release; } } ret = m88ds3103_wr_reg(priv, 0xb2, 0x00); if (ret) - goto err; + goto error_fw_release; release_firmware(fw); fw = NULL; @@ -686,9 +686,10 @@ skip_fw_download: priv->warm = true; return 0; -err: - release_firmware(fw); +error_fw_release: + release_firmware(fw); +err: dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); return ret; } |