Skip to content

Commit

Permalink
mtd: maps: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Syam Sidhardhan authored and David Woodhouse committed Apr 5, 2013
1 parent 8913405 commit 8be84e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/maps/ck804xrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 8be84e0

Please sign in to comment.