Conor Dooley 8e145bc705
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>
2022-03-18 22:30:43 +01:00
..
2022-01-31 20:16:28 +01:00
2022-01-23 06:20:44 +02:00
2022-02-25 17:05:11 +01:00
2022-01-18 14:03:34 +02:00
2022-01-30 01:06:35 +01:00
2022-01-23 06:20:44 +02:00
2022-02-01 16:52:54 +01:00
2022-01-29 21:03:20 +01:00
2022-01-23 06:20:44 +02:00
2022-01-12 11:11:34 -08:00
2022-01-23 06:20:44 +02:00
2022-01-22 08:33:37 +02:00
2022-01-22 09:52:17 +02:00
2022-01-16 08:08:11 +02:00
2022-01-22 08:33:37 +02:00
2022-01-11 11:26:57 -08:00
2022-01-20 13:25:01 +02:00
2022-01-27 11:23:26 +02:00
2022-02-01 12:39:37 -08:00
2022-02-25 17:05:11 +01:00
2021-12-29 10:54:50 +01:00
2022-01-20 13:31:46 +02:00
2022-01-23 06:20:44 +02:00
2022-01-17 08:07:57 +02:00
2022-01-22 08:33:37 +02:00