Explorar el Código

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 hace 13 años
padre
commit
8be84e035c
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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)) {