[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <546DA8BF.70005@users.sourceforge.net>
Date: Thu, 20 Nov 2014 09:39:27 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Antti Palosaari <crope@....fi>,
Mauro Carvalho Chehab <m.chehab@...sung.com>,
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 3/3] [media] si2168: One function call less in si2168_init()
after error detection
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 19 Nov 2014 23:23:15 +0100
The release_firmware() function was called in some cases by the
si2168_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@...rs.sourceforge.net>
---
drivers/media/dvb-frontends/si2168.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index 6a455f9..b8c6372 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -428,7 +428,7 @@ static int si2168_init(struct dvb_frontend *fe)
dev_err(&s->client->dev,
"%s: firmware file '%s' not found\n",
KBUILD_MODNAME, fw_file);
- goto err;
+ goto error_fw_release;
}
}
@@ -448,7 +448,7 @@ static int si2168_init(struct dvb_frontend *fe)
dev_err(&s->client->dev,
"%s: firmware download failed=%d\n",
KBUILD_MODNAME, ret);
- goto err;
+ goto error_fw_release;
}
}
@@ -468,9 +468,10 @@ static int si2168_init(struct dvb_frontend *fe)
s->active = true;
return 0;
-err:
- release_firmware(fw);
+error_fw_release:
+ release_firmware(fw);
+err:
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, 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