diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-01 15:34:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-01 06:22:27 -0300 |
commit | bf104c238dc1c7172460853882a545141eaa8222 (patch) | |
tree | bf2f1d7cd0e6dd3360ac34e42427a859f4933d06 /drivers/staging/media | |
parent | 68feaa6b8bc537de1d02732fb1b74fe5433ceff1 (diff) | |
download | op-kernel-dev-bf104c238dc1c7172460853882a545141eaa8222.zip op-kernel-dev-bf104c238dc1c7172460853882a545141eaa8222.tar.gz |
[media] mn88472: One function call less in mn88472_init() after error detection
The release_firmware() function was called in three cases by the mn88472_init()
function during error handling even if the passed variable "fw" 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/staging/media')
-rw-r--r-- | drivers/staging/media/mn88472/mn88472.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c index ce14cb2..219a7d1 100644 --- a/drivers/staging/media/mn88472/mn88472.c +++ b/drivers/staging/media/mn88472/mn88472.c @@ -270,7 +270,7 @@ static int mn88472_init(struct dvb_frontend *fe) ret = regmap_write(dev->regmap[0], 0xf5, 0x03); if (ret) - goto err; + goto firmware_release; for (remaining = fw->size; remaining > 0; remaining -= (dev->i2c_wr_max - 1)) { @@ -283,13 +283,13 @@ static int mn88472_init(struct dvb_frontend *fe) if (ret) { dev_err(&client->dev, "firmware download failed=%d\n", ret); - goto err; + goto firmware_release; } } ret = regmap_write(dev->regmap[0], 0xf5, 0x00); if (ret) - goto err; + goto firmware_release; release_firmware(fw); fw = NULL; @@ -298,9 +298,9 @@ static int mn88472_init(struct dvb_frontend *fe) dev->warm = true; return 0; -err: +firmware_release: release_firmware(fw); - +err: dev_dbg(&client->dev, "failed=%d\n", ret); return ret; } |