Skip to content
Snippets Groups Projects
Unverified Commit 8e145bc7 authored by Conor Dooley's avatar Conor Dooley Committed by Arnd Bergmann
Browse files

soc/microchip: fix invalid free in mpfs_sys_controller_delete

Fix an invalid kfree in mpfs_sys_controller_delete, by replacing the
devm_kzalloc with a regular kzalloc. Change the error handling in the
probe function to free the sys_controller struct if the probe fails.

> cocci warnings: (new ones prefixed by >>)
> >> drivers/soc/microchip/mpfs-sys-controller.c:73:1-6: WARNING: invalid free of devm_ allocated data
Link: https://lore.kernel.org/linux-mm/202203180259.lgIylRZV-lkp@intel.com/



Fixes: d0054a47 ("soc: add microchip polarfire soc system controller")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarConor Dooley <mail@conchuod.ie>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent c76edea0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment