Files
linux/drivers
Yongzhi Liu 86c9713602 misc: microchip: pci1xxxx: fix double free in the error handling of gp_aux_bus_probe()
commit 086c6cbcc563c81d55257f9b27e14faf1d0963d3 upstream.

When auxiliary_device_add() returns error and then calls
auxiliary_device_uninit(), callback function
gp_auxiliary_device_release() calls ida_free() and
kfree(aux_device_wrapper) to free memory. We should't
call them again in the error handling path.

Fix this by skipping the redundant cleanup functions.

Fixes: 393fc2f594 ("misc: microchip: pci1xxxx: load auxiliary bus driver for the PIO function in the multi-function endpoint of pci1xxxx device.")
Signed-off-by: Yongzhi Liu <hyperlyzcs@gmail.com>
Link: https://lore.kernel.org/r/20240523121434.21855-3-hyperlyzcs@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-21 14:38:36 +02:00
..
2024-06-12 11:12:52 +02:00
2023-08-22 15:50:57 +02:00
2023-08-24 16:20:30 -07:00
2024-06-12 11:11:58 +02:00
2023-11-20 11:59:19 +01:00
2024-02-05 20:14:15 +00:00
2024-03-26 18:20:10 -04:00
2023-08-21 13:27:44 +02:00