Skip to contentSkip to conversation

usb: typec: tcpci_mt6370: remove redundant dev_err_probe()

PATCH In review Zhu Wang 4 participants 4 messages Aug 1, 2023 – Aug 2, 2023

Subsystems (3)
lore
Share & tools
lore

Zhu Wang

author
#0 lore raw

PATCH 1/1 usb: typec: tcpci_mt6370: remove redundant dev_err_probe()

When platform_get_irq() is called, the error message has been printed, so it need not to call dev_err_probe() to present error messages.

---
 drivers/usb/typec/tcpm/tcpci_mt6370.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpci_mt6370.c +1 -1
index 2a079464b398..9cda1005ef01 100644
@@ -147,7 +147,7 @@ static int mt6370_tcpc_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(dev, irq, "Failed to get irq\n");
+		return irq;
 
 	/* Assign TCPCI feature and ops */
 	priv->tcpci_data.auto_discharge_disconnect = 1;
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Zhu Wang
Quoted 4 lines · Zhu Wang

When platform_get_irq() is called, the error message has been printed, so it need not to call dev_err_probe() to present error messages.

Quoted 17 lines
---
  drivers/usb/typec/tcpm/tcpci_mt6370.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpci_mt6370.c +1 -1
index 2a079464b398..9cda1005ef01 100644
@@ -147,7 +147,7 @@ static int mt6370_tcpc_probe(struct platform_device *pdev)
 
  	irq = platform_get_irq(pdev, 0);
  	if (irq < 0)
-		return dev_err_probe(dev, irq, "Failed to get irq\n");
+		return irq;
 
  	/* Assign TCPCI feature and ops */
  	priv->tcpci_data.auto_discharge_disconnect = 1;
maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Zhu Wang
Quoted 4 lines · Zhu Wang

When platform_get_irq() is called, the error message has been printed, so it need not to call dev_err_probe() to present error messages.

Quoted 19 lines
---
 drivers/usb/typec/tcpm/tcpci_mt6370.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpci_mt6370.c +1 -1
index 2a079464b398..9cda1005ef01 100644
@@ -147,7 +147,7 @@ static int mt6370_tcpc_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return dev_err_probe(dev, irq, "Failed to get irq\n");
+		return irq;
 
 	/* Assign TCPCI feature and ops */
 	priv->tcpci_data.auto_discharge_disconnect = 1;
Signature · 1 line
2.17.1
Signature · 1 line
heikki