[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <547B7D48.1010507@users.sourceforge.net>
Date: Sun, 30 Nov 2014 21:25:44 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Antti Palosaari <crope@....fi>,
Mauro Carvalho Chehab <mchehab@....samsung.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 1/2] [media] tuners: Deletion of unnecessary checks before
the function call "release_firmware"
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 30 Nov 2014 19:05:48 +0100
The release_firmware() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/media/tuners/si2157.c | 3 +--
drivers/media/tuners/xc5000.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 8e57696..e17ab1f 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -196,8 +196,7 @@ warm:
return 0;
err:
- if (fw)
- release_firmware(fw);
+ release_firmware(fw);
dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret;
diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index 705c258..2a039de 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -1336,8 +1336,7 @@ static int xc5000_release(struct dvb_frontend *fe)
if (priv) {
cancel_delayed_work(&priv->timer_sleep);
- if (priv->firmware)
- release_firmware(priv->firmware);
+ release_firmware(priv->firmware);
hybrid_tuner_release_state(priv);
}
--
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