Re: [PATCH 11/11] usb: typec: Remove redundant dev_err()/dev_err_probe()

Heikki Krogerus <[email protected]> Wed, 5 Aug 2026 14:12:55 +0200
Newsgroups org.infradead.lists.linux-mediatek,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <[email protected]>
On Fri, Jul 31, 2026 at 11:54:45AM +0800, Pan Chuang wrote:
> Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
> devm_request_*_irq()"), devm_request_threaded_irq() automatically logs
> 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]>

Acked-by: Heikki Krogerus <[email protected]>

> ---
>  drivers/usb/typec/anx7411.c               | 4 +---
>  drivers/usb/typec/hd3ss3220.c             | 4 +---
>  drivers/usb/typec/mux/it5205.c            | 2 +-
>  drivers/usb/typec/tcpm/tcpci_maxim_core.c | 3 +--
>  drivers/usb/typec/tcpm/tcpci_mt6360.c     | 1 -
>  drivers/usb/typec/tcpm/tcpci_mt6370.c     | 2 +-
>  6 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
> index 41df115912b9..2c41e00819f8 100644
> --- a/drivers/usb/typec/anx7411.c
> +++ b/drivers/usb/typec/anx7411.c
> @@ -1529,10 +1529,8 @@ static int anx7411_i2c_probe(struct i2c_client *client)
>  					IRQF_TRIGGER_FALLING |
>  					IRQF_ONESHOT,
>  					"anx7411-intp", plat);
> -	if (ret) {
> -		dev_err(dev, "fail to request irq\n");
> +	if (ret)
>  		goto free_wq;
> -	}
>  
>  	if (anx7411_typec_check_connection(plat))
>  		dev_err(dev, "check status\n");
> diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd3ss3220.c
> index 3e39b800e6b5..64648686bf8b 100644
> --- a/drivers/usb/typec/hd3ss3220.c
> +++ b/drivers/usb/typec/hd3ss3220.c
> @@ -436,10 +436,8 @@ static int hd3ss3220_probe(struct i2c_client *client)
>  						IRQF_TRIGGER_RISING |
>  						IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
>  						dev_name(hd3ss3220->dev), hd3ss3220);
> -		if (ret < 0) {
> -			dev_err(hd3ss3220->dev, "failed to get ID irq: %d\n", ret);
> +		if (ret < 0)
>  			goto err_put_fwnode;
> -		}
>  	}
>  
>  	typec_cap.prefer_role = TYPEC_NO_PREFERRED_ROLE;
> diff --git a/drivers/usb/typec/mux/it5205.c b/drivers/usb/typec/mux/it5205.c
> index 5e1a120b2e3b..2ab2ba6a3cbd 100644
> --- a/drivers/usb/typec/mux/it5205.c
> +++ b/drivers/usb/typec/mux/it5205.c
> @@ -250,7 +250,7 @@ static int it5205_probe(struct i2c_client *client)
>  		if (ret) {
>  			typec_mux_unregister(it->mux);
>  			typec_switch_unregister(it->sw);
> -			return dev_err_probe(dev, ret, "Failed to request irq\n");
> +			return ret;
>  		}
>  	}
>  
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim_core.c b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> index 998693a61839..52dbbbe53691 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> @@ -542,8 +542,7 @@ static int max_tcpci_probe(struct i2c_client *client)
>  					(IRQF_TRIGGER_LOW | IRQF_ONESHOT), dev_name(chip->dev),
>  					chip);
>  	if (ret < 0)
> -		return dev_err_probe(&client->dev, ret,
> -				     "IRQ initialization failed\n");
> +		return ret;
>  
>  	ret = devm_device_init_wakeup(chip->dev);
>  	if (ret)
> diff --git a/drivers/usb/typec/tcpm/tcpci_mt6360.c b/drivers/usb/typec/tcpm/tcpci_mt6360.c
> index 881ffacbfd77..d4010ea5183b 100644
> --- a/drivers/usb/typec/tcpm/tcpci_mt6360.c
> +++ b/drivers/usb/typec/tcpm/tcpci_mt6360.c
> @@ -167,7 +167,6 @@ static int mt6360_tcpc_probe(struct platform_device *pdev)
>  	ret = devm_request_threaded_irq(mti->dev, mti->irq, NULL, mt6360_irq, IRQF_ONESHOT,
>  					dev_name(&pdev->dev), mti);
>  	if (ret) {
> -		dev_err(mti->dev, "Failed to register irq\n");
>  		tcpci_unregister_port(mti->tcpci);
>  		return ret;
>  	}
> diff --git a/drivers/usb/typec/tcpm/tcpci_mt6370.c b/drivers/usb/typec/tcpm/tcpci_mt6370.c
> index 7d6c75c70985..2e85cb05ed37 100644
> --- a/drivers/usb/typec/tcpm/tcpci_mt6370.c
> +++ b/drivers/usb/typec/tcpm/tcpci_mt6370.c
> @@ -168,7 +168,7 @@ static int mt6370_tcpc_probe(struct platform_device *pdev)
>  	ret = devm_request_threaded_irq(dev, irq, NULL, mt6370_irq_handler,
>  					IRQF_ONESHOT, dev_name(dev), priv);
>  	if (ret)
> -		return dev_err_probe(dev, ret, "Failed to allocate irq\n");
> +		return ret;
>  
>  	device_init_wakeup(dev, true);
>  	dev_pm_set_wake_irq(dev, irq);
> -- 
> 2.34.1

-- 
heikki