[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <547CED4A.9000207@users.sourceforge.net>
Date: Mon, 01 Dec 2014 23:35:54 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Antti Palosaari <crope@....fi>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
devel@...verdev.osuosl.org, linux-media@...r.kernel.org
CC: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 2/2] [media] mn88473: One function call less in mn88473_init()
after error detection
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 1 Dec 2014 23:15:20 +0100
The release_firmware() function was called by the mn88473_init() function even
if a previous function call "request_firmware" failed.
This implementation detail could be improved by the introduction of another
jump label.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/staging/media/mn88473/mn88473.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c
index 52180bb..a333744 100644
--- a/drivers/staging/media/mn88473/mn88473.c
+++ b/drivers/staging/media/mn88473/mn88473.c
@@ -225,7 +225,7 @@ static int mn88473_init(struct dvb_frontend *fe)
ret = request_firmware(&fw, fw_file, &client->dev);
if (ret) {
dev_err(&client->dev, "firmare file '%s' not found\n", fw_file);
- goto err;
+ goto err_request_firmware;
}
dev_info(&client->dev, "downloading firmware from file '%s'\n",
@@ -261,9 +261,10 @@ static int mn88473_init(struct dvb_frontend *fe)
dev->warm = true;
return 0;
+
err:
release_firmware(fw);
-
+err_request_firmware:
dev_dbg(&client->dev, "failed=%d\n", ret);
return ret;
}
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists