mtd: maps: Remove redundant NULL check before kfree
authorSyam Sidhardhan <syamsidhardh@gmail.com>
Tue, 26 Feb 2013 19:46:56 +0000 (01:16 +0530)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 5 Apr 2013 11:54:27 +0000 (12:54 +0100)
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/maps/ck804xrom.c

index 586a1c7..0455166 100644 (file)
@@ -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)) {