mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 11:21:33 +00:00
mtd: fsl_ifc_nand: remove incorrect kfree()
The struct fsl_ifc_mtd is allocated with devm_kzalloc, so its memory is "managed" automatically by the kernel. That is, we do not need to free it explicitly; it will be freed when the device is removed. And we *certainly* shouldn't free it with a regular kfree(). Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
bddcb5e7ca
commit
b966a40a38
@ -908,7 +908,6 @@ static int fsl_ifc_chip_remove(struct fsl_ifc_mtd *priv)
|
||||
|
||||
ifc_nand_ctrl->chips[priv->bank] = NULL;
|
||||
dev_set_drvdata(priv->dev, NULL);
|
||||
kfree(priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user