usb: gadget: udc: renesas_usb3: fix double phy_put()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 2 Apr 2018 12:21:31 +0000 (21:21 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:38:09 +0000 (10:38 +0300)
This patch fixes an issue that this driver cause double phy_put()
calling. This driver must not call phy_put() in the remove because
the driver calls devm_phy_get() in the probe.

Fixes: 279d4bc64060 ("usb: gadget: udc: renesas_usb3: add support for generic phy")
Cc: <stable@vger.kernel.org> # v4.15+
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/renesas_usb3.c

index 2bb2cca5ca82355234f377111130782efd5e46d4..5caf78bbbf7c5deaf5612d96844eb6fab2a7d4e2 100644 (file)
@@ -2421,8 +2421,6 @@ static int renesas_usb3_remove(struct platform_device *pdev)
        renesas_usb3_dma_free_prd(usb3, &pdev->dev);
 
        __renesas_usb3_ep_free_request(usb3->ep0_req);
-       if (usb3->phy)
-               phy_put(usb3->phy);
        pm_runtime_disable(&pdev->dev);
 
        return 0;