Commit 9a7957d0 authored by Stephen Boyd's avatar Stephen Boyd Committed by Ulf Hansson
Browse files

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: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 8f05eee6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1409,7 +1409,6 @@ static int bcm2835_probe(struct platform_device *pdev)

	host->irq = platform_get_irq(pdev, 0);
	if (host->irq <= 0) {
		dev_err(dev, "get IRQ failed\n");
		ret = -EINVAL;
		goto err;
	}
+0 −1
Original line number Diff line number Diff line
@@ -969,7 +969,6 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
	host->irq = platform_get_irq(pdev, 0);
	if (host->irq < 0) {
		ret = host->irq;
		dev_err(&pdev->dev, "Failed to get platform irq: %d\n", ret);
		goto err_free_host;
	}

+0 −1
Original line number Diff line number Diff line
@@ -1091,7 +1091,6 @@ static int meson_mmc_probe(struct platform_device *pdev)

	host->irq = platform_get_irq(pdev, 0);
	if (host->irq <= 0) {
		dev_err(&pdev->dev, "failed to get interrupt resource.\n");
		ret = -EINVAL;
		goto free_host;
	}
+1 −3
Original line number Diff line number Diff line
@@ -1010,10 +1010,8 @@ static int mxcmci_probe(struct platform_device *pdev)

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	irq = platform_get_irq(pdev, 0);
	if (irq < 0) {
		dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq);
	if (irq < 0)
		return irq;
	}

	mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
	if (!mmc)
+0 −1
Original line number Diff line number Diff line
@@ -1614,7 +1614,6 @@ static int s3cmci_probe(struct platform_device *pdev)

	host->irq = platform_get_irq(pdev, 0);
	if (host->irq <= 0) {
		dev_err(&pdev->dev, "failed to get interrupt resource.\n");
		ret = -EINVAL;
		goto probe_iounmap;
	}
Loading