From 8e919af9c176d183562418365b4062284353cc40 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Mon, 2 Apr 2018 21:21:31 +0900 Subject: [PATCH] usb: gadget: udc: renesas_usb3: fix double phy_put() BugLink: http://bugs.launchpad.net/bugs/1790188 commit 8223b2f89ca63e203dcb54148e30d94979f17b0b upstream. 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: # v4.15+ Reviewed-by: Simon Horman Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa Signed-off-by: Kleber Sacilotto de Souza --- drivers/usb/gadget/udc/renesas_usb3.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index 164dd310b11a..2b9ee7ebd7cb 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2415,8 +2415,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; -- 2.39.5