Revision ba18deddd6d502da71fd6b6143c53042271b82bd authored by Yongzhi Liu on 06 March 2024, 10:57:14 UTC, committed by Paolo Abeni on 07 March 2024, 11:03:19 UTC
When auxiliary_device_add() returns error and then calls
auxiliary_device_uninit(), Callback function pdsc_auxbus_dev_release
calls kfree(padev) to free memory. We shouldn't call kfree(padev)
again in the error handling path.

Fix this by cleaning up the redundant kfree() and putting
the error handling back to where the errors happened.

Fixes: 4569cce43bc6 ("pds_core: add auxiliary_bus devices")
Signed-off-by: Yongzhi Liu <hyperlyzcs@gmail.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20240306105714.20597-1-hyperlyzcs@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent d5b8aff
History
File Mode Size
debug.config -rw-r--r-- 2.6 KB
hardening.config -rw-r--r-- 2.8 KB
kvm_guest.config -rw-r--r-- 702 bytes
nopm.config -rw-r--r-- 340 bytes
rust.config -rw-r--r-- 34 bytes
tiny-base.config -rw-r--r-- 16 bytes
tiny.config -rw-r--r-- 289 bytes
x86_debug.config -rw-r--r-- 461 bytes
xen.config -rw-r--r-- 1.1 KB

back to top