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.

usb: ohci-nxp: fix device leak on probe failure

Make sure to drop the reference taken when looking up the PHY I2C device
during probe on probe failure (e.g. probe deferral) and on driver
unbind.

Fixes: 73108aa90cbf ("USB: ohci-nxp: Use isp1301 driver")
Cc: stable@vger.kernel.org # 3.5
Reported-by: Ma Ke <make24@iscas.ac.cn>
Link: https://lore.kernel.org/lkml/20251117013428.21840-1-make24@iscas.ac.cn/
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://patch.msgid.link/20251218153519.19453-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
b4c61e54 b4b64fda

+2
+2
drivers/usb/host/ohci-nxp.c
··· 223 223 fail_resource: 224 224 usb_put_hcd(hcd); 225 225 fail_disable: 226 + put_device(&isp1301_i2c_client->dev); 226 227 isp1301_i2c_client = NULL; 227 228 return ret; 228 229 } ··· 235 234 usb_remove_hcd(hcd); 236 235 ohci_nxp_stop_hc(); 237 236 usb_put_hcd(hcd); 237 + put_device(&isp1301_i2c_client->dev); 238 238 isp1301_i2c_client = NULL; 239 239 } 240 240