mtd: maps: Remove redundant NULL check before kfree
PATCH 1/1 mtd: maps: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op.
Signed-off-by Syam Sidhardhan <[email protected]>
--- drivers/mtd/maps/ck804xrom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mtd/maps/ck804xrom.c +1 -2
@@ -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)) {
Signature · 1 line
1.7.9.5
Artem Bityutskiy
AppliedQuoted 3 lines · Syam Sidhardhan
kfree on NULL pointer is a no-op.
Signed-off-by Syam Sidhardhan <[email protected]>
Pushed to l2-mtd.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy