Skip to content

Commit

Permalink
mtd: gpmi: fix a dereferencing freed memory error
Browse files Browse the repository at this point in the history
The patch "490e280 mtd: gpmi-nand: Convert to module_platform_driver()"
introduced a "dereferencing freed memory" error.

This patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Huang Shijie authored and Artem Bityutskiy committed Feb 4, 2013
1 parent 6d2559f commit 26738dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/gpmi-nand/gpmi-nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -1657,8 +1657,8 @@ static int gpmi_nand_probe(struct platform_device *pdev)
release_resources(this);
exit_acquire_resources:
platform_set_drvdata(pdev, NULL);
kfree(this);
dev_err(this->dev, "driver registration failed: %d\n", ret);
kfree(this);

return ret;
}
Expand Down

0 comments on commit 26738dd

Please sign in to comment.