Commit 26738ddb authored by Huang Shijie's avatar Huang Shijie Committed by Artem Bityutskiy

mtd: gpmi: fix a dereferencing freed memory error

The patch "490e280a mtd: gpmi-nand: Convert to module_platform_driver()"
introduced a "dereferencing freed memory" error.

This patch fixes it.
Signed-off-by: default avatarHuang Shijie <b32955@freescale.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 6d2559f8
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment