Browse Source

mtd: maps: Remove redundant NULL check before kfree

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>
Syam Sidhardhan 12 years ago
parent
commit
8be84e035c
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/mtd/maps/ck804xrom.c

+ 1 - 2
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)) {