Loading
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() stable inclusion from stable-v6.6.72 commit dcd4de31bd01a7189c24e3cafe40649c9c42b9af category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBQN9L Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dcd4de31bd01a7189c24e3cafe40649c9c42b9af -------------------------------- commit 74adad500346fb07d69af2c79acbff4adb061134 upstream. 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:Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Acked-by:
Peter 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:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Wen Zhiwei <wenzhiwei@kylinos.cn>