[PATCH] mmc: host: Remove redundant dev_err()/dev_err_probe()

Adrian Hunter adrian.hunter at intel.com
Tue Jul 21 03:21:24 PDT 2026


On 17/07/2026 13:14, Pan Chuang wrote:
> 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 <panchuang at vivo.com>

Reviewed-by: Adrian Hunter <adrian.hunter at intel.com>

> ---
>  drivers/mmc/host/alcor.c         |  3 +--
>  drivers/mmc/host/cavium-octeon.c | 10 ++--------
>  drivers/mmc/host/meson-mx-sdio.c |  5 +----
>  drivers/mmc/host/mvsdio.c        |  4 +---
>  drivers/mmc/host/omap_hsmmc.c    |  4 +---
>  drivers/mmc/host/owl-mmc.c       |  5 +----
>  drivers/mmc/host/sdhci-msm.c     |  4 +---
>  drivers/mmc/host/sh_mmcif.c      |  8 ++------
>  8 files changed, 10 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/mmc/host/alcor.c b/drivers/mmc/host/alcor.c
> index 721db54739c1..45528909a758 100644
> --- a/drivers/mmc/host/alcor.c
> +++ b/drivers/mmc/host/alcor.c
> @@ -1103,8 +1103,7 @@ static int alcor_pci_sdmmc_drv_probe(struct platform_device *pdev)
>  			alcor_irq, alcor_irq_thread, IRQF_SHARED,
>  			DRV_NAME_ALCOR_PCI_SDMMC, host);
>  	if (ret)
> -		return dev_err_probe(&pdev->dev, ret,
> -				     "Failed to get irq for data line\n");
> +		return ret;
>  
>  	mutex_init(&host->cmd_mutex);
>  	INIT_DELAYED_WORK(&host->timeout_work, alcor_timeout_timer);
> diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
> index 8a0daddd9200..1bfc1a4f9fe9 100644
> --- a/drivers/mmc/host/cavium-octeon.c
> +++ b/drivers/mmc/host/cavium-octeon.c
> @@ -240,21 +240,15 @@ static int octeon_mmc_probe(struct platform_device *pdev)
>  			ret = devm_request_irq(&pdev->dev, mmc_irq[i],
>  					       cvm_mmc_interrupt,
>  					       0, cvm_mmc_irq_names[i], host);
> -			if (ret < 0) {
> -				dev_err(&pdev->dev, "Error: devm_request_irq %d\n",
> -					mmc_irq[i]);
> +			if (ret < 0)
>  				return ret;
> -			}
>  		}
>  	} else {
>  		ret = devm_request_irq(&pdev->dev, mmc_irq[0],
>  				       cvm_mmc_interrupt, 0, KBUILD_MODNAME,
>  				       host);
> -		if (ret < 0) {
> -			dev_err(&pdev->dev, "Error: devm_request_irq %d\n",
> -				mmc_irq[0]);
> +		if (ret < 0)
>  			return ret;
> -		}
>  	}
>  
>  	host->global_pwr_gpiod = devm_gpiod_get_optional(&pdev->dev,
> diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
> index 5921e2cb2180..bef5e843f449 100644
> --- a/drivers/mmc/host/meson-mx-sdio.c
> +++ b/drivers/mmc/host/meson-mx-sdio.c
> @@ -683,11 +683,8 @@ static int meson_mx_mmc_probe(struct platform_device *pdev)
>  					meson_mx_mmc_irq,
>  					meson_mx_mmc_irq_thread, IRQF_ONESHOT,
>  					NULL, host);
> -	if (ret) {
> -		dev_err_probe(host->controller_dev, ret,
> -			      "Failed to request IRQ\n");
> +	if (ret)
>  		goto error_unregister_slot_pdev;
> -	}
>  
>  	core_clk = devm_clk_get_enabled(host->controller_dev, "core");
>  	if (IS_ERR(core_clk)) {
> diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
> index 79df2fa89a3f..cf705b265e21 100644
> --- a/drivers/mmc/host/mvsdio.c
> +++ b/drivers/mmc/host/mvsdio.c
> @@ -764,10 +764,8 @@ static int mvsd_probe(struct platform_device *pdev)
>  	mvsd_power_down(host);
>  
>  	ret = devm_request_irq(&pdev->dev, irq, mvsd_irq, 0, DRIVER_NAME, host);
> -	if (ret) {
> -		dev_err(&pdev->dev, "cannot assign irq %d\n", irq);
> +	if (ret)
>  		goto out;
> -	}
>  
>  	timer_setup(&host->timer, mvsd_timeout_timer, 0);
>  	platform_set_drvdata(pdev, mmc);
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 58c881f2725b..63a9fb970975 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1915,10 +1915,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
>  	/* Request IRQ for MMC operations */
>  	ret = devm_request_irq(&pdev->dev, host->irq, omap_hsmmc_irq, 0,
>  			mmc_hostname(mmc), host);
> -	if (ret) {
> -		dev_err(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n");
> +	if (ret)
>  		goto err_irq;
> -	}
>  
>  	ret = omap_hsmmc_reg_get(host);
>  	if (ret)
> diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c
> index 349082d76a99..d5b8a110267b 100644
> --- a/drivers/mmc/host/owl-mmc.c
> +++ b/drivers/mmc/host/owl-mmc.c
> @@ -635,11 +635,8 @@ static int owl_mmc_probe(struct platform_device *pdev)
>  
>  	ret = devm_request_irq(&pdev->dev, owl_host->irq, owl_irq_handler,
>  			       0, dev_name(&pdev->dev), owl_host);
> -	if (ret) {
> -		dev_err(&pdev->dev, "Failed to request irq %d\n",
> -			owl_host->irq);
> +	if (ret)
>  		goto err_release_channel;
> -	}
>  
>  	ret = mmc_add_host(mmc);
>  	if (ret) {
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index ceed47ccfda8..4aff965f0e2e 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -2864,10 +2864,8 @@ static int sdhci_msm_probe(struct platform_device *pdev)
>  	ret = devm_request_threaded_irq(&pdev->dev, msm_host->pwr_irq, NULL,
>  					sdhci_msm_pwr_irq, IRQF_ONESHOT,
>  					dev_name(&pdev->dev), host);
> -	if (ret) {
> -		dev_err(&pdev->dev, "Request IRQ failed (%d)\n", ret);
> +	if (ret)
>  		goto clk_disable;
> -	}
>  
>  	msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY;
>  
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 9831956de1c8..7706d01b149e 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -1505,18 +1505,14 @@ static int sh_mmcif_probe(struct platform_device *pdev)
>  	name = irq[1] < 0 ? dev_name(dev) : "sh_mmc:error";
>  	ret = devm_request_threaded_irq(dev, irq[0], sh_mmcif_intr,
>  					sh_mmcif_irqt, 0, name, host);
> -	if (ret) {
> -		dev_err(dev, "request_irq error (%s)\n", name);
> +	if (ret)
>  		goto err_clk;
> -	}
>  	if (irq[1] >= 0) {
>  		ret = devm_request_threaded_irq(dev, irq[1],
>  						sh_mmcif_intr, sh_mmcif_irqt,
>  						0, "sh_mmc:int", host);
> -		if (ret) {
> -			dev_err(dev, "request_irq error (sh_mmc:int)\n");
> +		if (ret)
>  			goto err_clk;
> -		}
>  	}
>  
>  	mutex_init(&host->thread_lock);




More information about the linux-amlogic mailing list