linux-stable/drivers/soc/xilinx
Gaosheng Cui 9dfb6c784e driver: soc: xilinx: fix memory leak in xlnx_add_cb_for_notify_event()
[ Upstream commit 1bea534991 ]

The kfree() should be called when memory fails to be allocated for
cb_data in xlnx_add_cb_for_notify_event(), otherwise there will be
a memory leak, so add kfree() to fix it.

Fixes: 05e5ba40ea ("driver: soc: xilinx: Add support of multiple callbacks for same event in event management driver")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20221129010146.1026685-1-cuigaosheng1@huawei.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:50:21 +01:00
..
Kconfig drivers: soc: xilinx: add xilinx event management driver 2021-12-03 16:08:46 +01:00
Makefile drivers: soc: xilinx: add xilinx event management driver 2021-12-03 16:08:46 +01:00
xlnx_event_manager.c driver: soc: xilinx: fix memory leak in xlnx_add_cb_for_notify_event() 2023-03-11 13:50:21 +01:00
zynqmp_pm_domains.c soc: xilinx: add a to_zynqmp_pm_domain macro 2021-12-08 12:53:36 +01:00
zynqmp_power.c driver: soc: xilinx: Update function prototype for xlnx_unregister_event 2022-05-19 18:57:28 +02:00