Commit 97299a30 authored by Stephen Boyd's avatar Stephen Boyd Committed by Mauro Carvalho Chehab
Browse files

media: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 25a3d6ba
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2540,7 +2540,6 @@ static int vpfe_probe(struct platform_device *pdev)

	ret = platform_get_irq(pdev, 0);
	if (ret <= 0) {
		dev_err(&pdev->dev, "No IRQ resource\n");
		ret = -ENODEV;
		goto probe_out_cleanup;
	}
+2 −5
Original line number Diff line number Diff line
@@ -160,11 +160,8 @@ static int atmel_isc_probe(struct platform_device *pdev)
	}

	irq = platform_get_irq(pdev, 0);
	if (irq < 0) {
		ret = irq;
		dev_err(dev, "failed to get irq: %d\n", ret);
		return ret;
	}
	if (irq < 0)
		return irq;

	ret = devm_request_irq(dev, irq, isc_interrupt, 0,
			       ATMEL_ISC_NAME, isc);
+1 −3
Original line number Diff line number Diff line
@@ -803,10 +803,8 @@ static int s5pcsis_probe(struct platform_device *pdev)
		return PTR_ERR(state->regs);

	state->irq = platform_get_irq(pdev, 0);
	if (state->irq < 0) {
		dev_err(dev, "Failed to get irq\n");
	if (state->irq < 0)
		return state->irq;
	}

	for (i = 0; i < CSIS_NUM_SUPPLIES; i++)
		state->supplies[i].supply = csis_supply_name[i];
+1 −3
Original line number Diff line number Diff line
@@ -1661,10 +1661,8 @@ static int pxp_probe(struct platform_device *pdev)
	}

	irq = platform_get_irq(pdev, 0);
	if (irq < 0) {
		dev_err(&pdev->dev, "Failed to get irq resource: %d\n", irq);
	if (irq < 0)
		return irq;
	}

	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, pxp_irq_handler,
			IRQF_ONESHOT, dev_name(&pdev->dev), dev);
+0 −1
Original line number Diff line number Diff line
@@ -2387,7 +2387,6 @@ static int isp_probe(struct platform_device *pdev)
	/* Interrupt */
	ret = platform_get_irq(pdev, 0);
	if (ret <= 0) {
		dev_err(isp->dev, "No IRQ resource\n");
		ret = -ENODEV;
		goto error_iommu;
	}
Loading