]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fri, 12 Jan 2018 11:00:56 +0000 (20:00 +0900)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 21 Mar 2018 16:40:43 +0000 (13:40 -0300)
commit30156062b76ebb34ef06da755a52d3002303516d
tree92e831fdea0cd044fb2b3562d865686abb711894
parent35a865a301612172122cfdd1436ce361d4c49699
usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove()

BugLink: http://bugs.launchpad.net/bugs/1757465
commit e3190868e5f52fb26544f16463593d54ce46ce61 upstream.

This patch fixes an issue that the renesas_usb3_remove() causes
NULL pointer dereference because the usb3_to_dev() macro will use
the gadget instance and it will be deleted before.

Fixes: cf06df3fae28 ("usb: gadget: udc: renesas_usb3: move pm_runtime_{en,dis}able()")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/gadget/udc/renesas_usb3.c