Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: mwifiex: drop redundant device reference

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.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260306085144.12064-10-johan@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Johan Hovold and committed by
Johannes Berg
97492c01 6f29eda7

-4
-4
drivers/net/wireless/marvell/mwifiex/usb.c
··· 520 520 return ret; 521 521 } 522 522 523 - usb_get_dev(udev); 524 - 525 523 return 0; 526 524 } 527 525 ··· 664 666 mwifiex_dbg(adapter, FATAL, 665 667 "%s: removing card\n", __func__); 666 668 mwifiex_remove_card(adapter); 667 - 668 - usb_put_dev(interface_to_usbdev(intf)); 669 669 } 670 670 671 671 static void mwifiex_usb_coredump(struct device *dev)