mtd: maps: Remove redundant NULL check before kfree
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Apr 5 08:59:05 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8be84e035c3f585f22f87034b41324681cf5c3ad
Commit: 8be84e035c3f585f22f87034b41324681cf5c3ad
Parent: 8913405593c358c050cfb485652f9e40288e38df
Author: Syam Sidhardhan <syamsidhardh at gmail.com>
AuthorDate: Wed Feb 27 01:16:56 2013 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 12:54:27 2013 +0100
mtd: maps: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam at samsung.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/maps/ck804xrom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index 586a1c7..0455166 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -308,8 +308,7 @@ static int ck804xrom_init_one(struct pci_dev *pdev,
out:
/* Free any left over map structures */
- if (map)
- kfree(map);
+ kfree(map);
/* See if I have any map structures */
if (list_empty(&window->maps)) {
More information about the linux-mtd-cvs
mailing list