diff options
author | Conor Dooley <conor.dooley@microchip.com> | 2022-03-18 17:21:08 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2022-03-18 22:30:43 +0100 |
commit | 8e145bc705e738ebe7ed6c53d93278981d9af356 (patch) | |
tree | c03c8150367450ede547ba1edf6728f050d872b2 /lib/mpi/mpi-bit.c | |
parent | c76edea0e52d5522835534de90c893ca50b04402 (diff) |
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: d0054a470c33 ("soc: add microchip polarfire soc system controller")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Conor Dooley <mail@conchuod.ie>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions