[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <563C7B7A.2080403@users.sourceforge.net>
Date: Fri, 6 Nov 2015 11:05:46 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Ian Munsie <imunsie@....ibm.com>,
Michael Neuling <mikey@...ling.org>,
linuxppc-dev@...ts.ozlabs.org
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] cxl: Delete an unnecessary check before the function call
"kfree"
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 6 Nov 2015 11:00:23 +0100
The kfree() 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/misc/cxl/context.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/cxl/context.c b/drivers/misc/cxl/context.c
index 2faa127..52e39b6 100644
--- a/drivers/misc/cxl/context.c
+++ b/drivers/misc/cxl/context.c
@@ -275,9 +275,7 @@ static void reclaim_ctx(struct rcu_head *rcu)
if (ctx->kernelapi)
kfree(ctx->mapping);
- if (ctx->irq_bitmap)
- kfree(ctx->irq_bitmap);
-
+ kfree(ctx->irq_bitmap);
kfree(ctx);
}
--
2.6.2
--
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