[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56814A62.7070309@users.sourceforge.net>
Date: Mon, 28 Dec 2015 15:42:42 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-media@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@....samsung.com>
Cc: Julia Lawall <julia.lawall@...6.fr>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 2/2] [media] tuners: Refactoring for m88rs6000t_sleep()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 28 Dec 2015 15:20:45 +0100
This issue was detected by using the Coccinelle software.
1. Let us return directly if a call of the regmap_write() function failed.
2. Delete the jump label "err" then.
3. Return zero as a constant at the end.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/media/tuners/m88rs6000t.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/media/tuners/m88rs6000t.c b/drivers/media/tuners/m88rs6000t.c
index 7e59a9f..8d10798 100644
--- a/drivers/media/tuners/m88rs6000t.c
+++ b/drivers/media/tuners/m88rs6000t.c
@@ -463,13 +463,12 @@ static int m88rs6000t_sleep(struct dvb_frontend *fe)
dev_dbg(&dev->client->dev, "%s:\n", __func__);
ret = regmap_write(dev->regmap, 0x07, 0x6d);
- if (ret)
- goto err;
- usleep_range(5000, 10000);
-err:
- if (ret)
+ if (ret) {
dev_dbg(&dev->client->dev, "failed=%d\n", ret);
- return ret;
+ return ret;
+ }
+ usleep_range(5000, 10000);
+ return 0;
}
static int m88rs6000t_get_frequency(struct dvb_frontend *fe, u32 *frequency)
--
2.6.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