public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] skd: remove unneeded NULL check in skd_acquire_msix()
@ 2014-01-30 11:57 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-01-30 11:57 UTC (permalink / raw)
  To: kernel-janitors

kfree() takes NULL pointers and also the variable can never be NULL
here anyway.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index eb6e1e0e8db2..5ca729e6f644 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -4013,8 +4013,7 @@ static int skd_acquire_msix(struct skd_device *skdev)
 	return 0;
 
 msix_out:
-	if (entries)
-		kfree(entries);
+	kfree(entries);
 	skd_release_msix(skdev);
 	return rc;
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-30 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-30 11:57 [patch] skd: remove unneeded NULL check in skd_acquire_msix() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox