diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-30 16:48:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-04 15:28:51 -0200 |
commit | e358c8a60f62fa89a13e35686f79eaeda0ca2127 (patch) | |
tree | 7d2ff9bc631e1108a2cd30d5aedbf560e1bac975 /drivers/media/tuners | |
parent | dc89cfcf33bfd15ad335207062c1f87b6074f222 (diff) |
[media] si2157: One function call less in si2157_init() after error
The release_firmware() function was called in some cases by the si2157_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/tuners')
-rw-r--r-- | drivers/media/tuners/si2157.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index e17ab1ffc27..2180de9d654 100644 --- a/drivers/media/tuners/si2157.c +++ b/drivers/media/tuners/si2157.c @@ -157,7 +157,7 @@ static int si2157_init(struct dvb_frontend *fe) dev_err(&s->client->dev, "firmware file '%s' is invalid\n", fw_file); ret = -EINVAL; - goto err; + goto fw_release_exit; } dev_info(&s->client->dev, "downloading firmware from file '%s'\n", @@ -173,7 +173,7 @@ static int si2157_init(struct dvb_frontend *fe) dev_err(&s->client->dev, "firmware download failed=%d\n", ret); - goto err; + goto fw_release_exit; } } @@ -195,9 +195,9 @@ warm: s->active = true; return 0; -err: +fw_release_exit: release_firmware(fw); - +err: dev_dbg(&s->client->dev, "failed=%d\n", ret); return ret; } |