diff options
| author | Johan Hovold <johan@kernel.org> | 2026-03-05 11:45:49 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-03-06 15:38:21 -0800 |
| commit | 224a0d284c3caf1951302d1744a714784febed71 (patch) | |
| tree | 0792f8fb20938b0d81d4b71d10db3a12e5674fda /tools/perf/scripts/python | |
| parent | 0e16181704e37330069c24cea143f15b7b298da3 (diff) | |
| download | linux-224a0d284c3caf1951302d1744a714784febed71.tar.gz linux-224a0d284c3caf1951302d1744a714784febed71.zip | |
net: mctp: fix device leak on probe failure
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
This driver takes a reference to the USB device during probe but does
not to release it on probe failures.
Drop the redundant device reference to fix the leak, reduce cargo
culting, make it easier to spot drivers where an extra reference is
needed, and reduce the risk of further memory leaks.
Fixes: 0791c0327a6e ("net: mctp: Add MCTP USB transport driver")
Cc: stable@vger.kernel.org # 6.15
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20260305104549.16110-1-johan@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
