[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <558BE829.4070901@users.sourceforge.net>
Date: Thu, 25 Jun 2015 13:38:17 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Tony Lindgren <tony@...mide.com>,
Russell King <linux@....linux.org.uk>,
linux-arm-kernel@...ts.infradead.org, linux-omap@...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] ARM-OMAP2+: Delete an unnecessary check before the function
call "omap_device_delete"
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 25 Jun 2015 13:00:11 +0200
The omap_device_delete() 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>
---
arch/arm/mach-omap2/omap_device.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 4cb8fd9..196366e 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -193,8 +193,7 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
switch (event) {
case BUS_NOTIFY_DEL_DEVICE:
- if (pdev->archdata.od)
- omap_device_delete(pdev->archdata.od);
+ omap_device_delete(pdev->archdata.od);
break;
case BUS_NOTIFY_ADD_DEVICE:
if (pdev->dev.of_node)
--
2.4.4
--
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