mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
d1dc9c1276
commit
f755bbbf1f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user