mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
mmc: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: linux-mmc@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
committed by
Ulf Hansson
parent
8f05eee67c
commit
9a7957d0c9
@@ -1409,7 +1409,6 @@ static int bcm2835_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
host->irq = platform_get_irq(pdev, 0);
|
host->irq = platform_get_irq(pdev, 0);
|
||||||
if (host->irq <= 0) {
|
if (host->irq <= 0) {
|
||||||
dev_err(dev, "get IRQ failed\n");
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@@ -969,7 +969,6 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
|
|||||||
host->irq = platform_get_irq(pdev, 0);
|
host->irq = platform_get_irq(pdev, 0);
|
||||||
if (host->irq < 0) {
|
if (host->irq < 0) {
|
||||||
ret = host->irq;
|
ret = host->irq;
|
||||||
dev_err(&pdev->dev, "Failed to get platform irq: %d\n", ret);
|
|
||||||
goto err_free_host;
|
goto err_free_host;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1091,7 +1091,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
host->irq = platform_get_irq(pdev, 0);
|
host->irq = platform_get_irq(pdev, 0);
|
||||||
if (host->irq <= 0) {
|
if (host->irq <= 0) {
|
||||||
dev_err(&pdev->dev, "failed to get interrupt resource.\n");
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto free_host;
|
goto free_host;
|
||||||
}
|
}
|
||||||
|
@@ -1010,10 +1010,8 @@ static int mxcmci_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0)
|
||||||
dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq);
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
|
mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
|
||||||
if (!mmc)
|
if (!mmc)
|
||||||
|
@@ -1614,7 +1614,6 @@ static int s3cmci_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
host->irq = platform_get_irq(pdev, 0);
|
host->irq = platform_get_irq(pdev, 0);
|
||||||
if (host->irq <= 0) {
|
if (host->irq <= 0) {
|
||||||
dev_err(&pdev->dev, "failed to get interrupt resource.\n");
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto probe_iounmap;
|
goto probe_iounmap;
|
||||||
}
|
}
|
||||||
|
@@ -1917,8 +1917,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||||||
/* Setup IRQ for handling power/voltage tasks with PMIC */
|
/* Setup IRQ for handling power/voltage tasks with PMIC */
|
||||||
msm_host->pwr_irq = platform_get_irq_byname(pdev, "pwr_irq");
|
msm_host->pwr_irq = platform_get_irq_byname(pdev, "pwr_irq");
|
||||||
if (msm_host->pwr_irq < 0) {
|
if (msm_host->pwr_irq < 0) {
|
||||||
dev_err(&pdev->dev, "Get pwr_irq failed (%d)\n",
|
|
||||||
msm_host->pwr_irq);
|
|
||||||
ret = msm_host->pwr_irq;
|
ret = msm_host->pwr_irq;
|
||||||
goto clk_disable;
|
goto clk_disable;
|
||||||
}
|
}
|
||||||
|
@@ -129,7 +129,6 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
|
|||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0) {
|
||||||
dev_err(&pdev->dev, "failed to get IRQ number\n");
|
|
||||||
ret = irq;
|
ret = irq;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@@ -490,10 +490,8 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0)
|
||||||
dev_err(dev, "no irq specified\n");
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
host = sdhci_alloc_host(dev, sizeof(struct sdhci_s3c));
|
host = sdhci_alloc_host(dev, sizeof(struct sdhci_s3c));
|
||||||
if (IS_ERR(host)) {
|
if (IS_ERR(host)) {
|
||||||
|
@@ -119,10 +119,8 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev)
|
|||||||
u32 reg = 0;
|
u32 reg = 0;
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0)
|
||||||
dev_err(dev, "%s: no irq specified\n", __func__);
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
host = sdhci_alloc_host(dev, sizeof(struct f_sdhost_priv));
|
host = sdhci_alloc_host(dev, sizeof(struct f_sdhost_priv));
|
||||||
if (IS_ERR(host))
|
if (IS_ERR(host))
|
||||||
|
@@ -557,10 +557,8 @@ static int uniphier_sd_probe(struct platform_device *pdev)
|
|||||||
int irq, ret;
|
int irq, ret;
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0)
|
||||||
dev_err(dev, "failed to get IRQ number");
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||||
if (!priv)
|
if (!priv)
|
||||||
|
Reference in New Issue
Block a user