Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f755bbbf authored by Julia Lawall's avatar Julia Lawall Committed by Jonathan Cameron
Browse files

drivers/iio/adc/at91_adc.c: adjust inconsistent IS_ERR and PTR_ERR

Change the call to PTR_ERR to access the value just tested by IS_ERR.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/

)

// <smpl>
@@
expression e,e1;
@@

(
if (IS_ERR(e)) { ... PTR_ERR(e) ... }
|
if (IS_ERR(e=e1)) { ... PTR_ERR(e) ... }
|
*if (IS_ERR(e))
 { ...
*  PTR_ERR(e1)
   ... }
)
// </smpl>

Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent d1dc9c12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -617,7 +617,7 @@ static int __devinit at91_adc_probe(struct platform_device *pdev)
	st->adc_clk = clk_get(&pdev->dev, "adc_op_clk");
	if (IS_ERR(st->adc_clk)) {
		dev_err(&pdev->dev, "Failed to get the ADC clock.\n");
		ret = PTR_ERR(st->clk);
		ret = PTR_ERR(st->adc_clk);
		goto error_disable_clk;
	}