[PATCH 09/11] usb: phy: Remove redundant dev_err()/dev_err_probe()

Pan Chuang <[email protected]> Fri, 31 Jul 2026 11:54:43 +0800
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"),
devm_request_irq() and devm_request_threaded_irq() automatically log
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err() and dev_err_probe() calls.

Signed-off-by: Pan Chuang <[email protected]>
---
 drivers/usb/phy/phy-ab8500-usb.c    | 12 +++---------
 drivers/usb/phy/phy-generic.c       |  3 +--
 drivers/usb/phy/phy-gpio-vbus-usb.c |  5 +----
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 6a98aeeeae31..e2e06e57dced 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -748,10 +748,8 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 				ab8500_usb_link_status_irq,
 				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
 				"usb-link-status", ab);
-		if (err < 0) {
-			dev_err(ab->dev, "request_irq failed for link status irq\n");
+		if (err < 0)
 			return err;
-		}
 	}
 
 	if (ab->flags & AB8500_USB_FLAG_USE_ID_WAKEUP_IRQ) {
@@ -762,10 +760,8 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 				ab8500_usb_disconnect_irq,
 				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
 				"usb-id-fall", ab);
-		if (err < 0) {
-			dev_err(ab->dev, "request_irq failed for ID fall irq\n");
+		if (err < 0)
 			return err;
-		}
 	}
 
 	if (ab->flags & AB8500_USB_FLAG_USE_VBUS_DET_IRQ) {
@@ -776,10 +772,8 @@ static int ab8500_usb_irq_setup(struct platform_device *pdev,
 				ab8500_usb_disconnect_irq,
 				IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT,
 				"usb-vbus-fall", ab);
-		if (err < 0) {
-			dev_err(ab->dev, "request_irq failed for Vbus fall irq\n");
+		if (err < 0)
 			return err;
-		}
 	}
 
 	return 0;
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index de26b302334d..a41671eda2a1 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -282,8 +282,7 @@ static int usb_phy_generic_probe(struct platform_device *pdev)
 						VBUS_IRQ_FLAGS, "vbus_detect",
 						nop);
 		if (err)
-			return dev_err_probe(dev, err, "can't request irq %i\n",
-					     gpiod_to_irq(nop->gpiod_vbus));
+			return err;
 
 		nop->phy.otg->state = gpiod_get_value(nop->gpiod_vbus) ?
 			OTG_STATE_B_PERIPHERAL : OTG_STATE_B_IDLE;
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c
index ce09e789afd8..c0135a30cabd 100644
--- a/drivers/usb/phy/phy-gpio-vbus-usb.c
+++ b/drivers/usb/phy/phy-gpio-vbus-usb.c
@@ -297,11 +297,8 @@ static int gpio_vbus_probe(struct platform_device *pdev)
 
 	err = devm_request_irq(&pdev->dev, irq, gpio_vbus_irq, irqflags,
 			       "vbus_detect", pdev);
-	if (err) {
-		dev_err(&pdev->dev, "can't request irq %i, err: %d\n",
-			irq, err);
+	if (err)
 		return err;
-	}
 
 	INIT_DELAYED_WORK(&gpio_vbus->work, gpio_vbus_work);
 
-- 
2.34.1