mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 02:52:56 +00:00
mtd: gpmi: fix a dereferencing freed memory error
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>
This commit is contained in:
parent
6d2559f8bc
commit
26738ddb85
@ -1657,8 +1657,8 @@ exit_nfc_init:
|
|||||||
release_resources(this);
|
release_resources(this);
|
||||||
exit_acquire_resources:
|
exit_acquire_resources:
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
kfree(this);
|
|
||||||
dev_err(this->dev, "driver registration failed: %d\n", ret);
|
dev_err(this->dev, "driver registration failed: %d\n", ret);
|
||||||
|
kfree(this);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user