mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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>
This commit is contained in:
parent
6f29eda7b7
commit
97492c019d
|
|
@ -520,8 +520,6 @@ static int mwifiex_usb_probe(struct usb_interface *intf,
|
|||
return ret;
|
||||
}
|
||||
|
||||
usb_get_dev(udev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -666,8 +664,6 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf)
|
|||
mwifiex_dbg(adapter, FATAL,
|
||||
"%s: removing card\n", __func__);
|
||||
mwifiex_remove_card(adapter);
|
||||
|
||||
usb_put_dev(interface_to_usbdev(intf));
|
||||
}
|
||||
|
||||
static void mwifiex_usb_coredump(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user