Commit 7ae96eba authored by Joe Hattori's avatar Joe Hattori Committed by Greg Kroah-Hartman
Browse files

usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in...


usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe()

[ Upstream commit 74adad50 ]

Current implementation of ci_hdrc_imx_driver does not decrement the
refcount of the device obtained in usbmisc_get_init_data(). Add a
put_device() call in .remove() and in .probe() before returning an
error.

This bug was found by an experimental static analysis tool that I am
developing.

Cc: stable <stable@kernel.org>
Fixes: f40017e0 ("chipidea: usbmisc_imx: Add USB support for VF610 SoCs")
Signed-off-by: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Acked-by: default avatarPeter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20241216015539.352579-1-joe@pf.is.s.u-tokyo.ac.jp


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b2757f25
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment