aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/sa1111.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-12-13 10:37:59 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-14 06:03:46 -0500
commit442a902262e1dfc3f1298ceea5f3120fe2043904 (patch)
tree6bf2510f63591779c5c6d5c2195f75ba84b18cd7 /arch/arm/common/sa1111.c
parent674a0a6939a954ab92fdd9833943e2277550bb0a (diff)
[ARM] arch/arm/common/sa1111.c: Correct error handling code
If it is reasonable to apply PTR_ERR to the result of calling clk_get, then that result should first be tested with IS_ERR, not with !. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E,E1; @@ if ( - E == NULL + IS_ERR(E) ) { <+... when != E = E1 PTR_ERR(E) ...+> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common/sa1111.c')
-rw-r--r--arch/arm/common/sa1111.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 47ccec95f3e8..ef12794c3c68 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
630 return -ENOMEM; 630 return -ENOMEM;
631 631
632 sachip->clk = clk_get(me, "SA1111_CLK"); 632 sachip->clk = clk_get(me, "SA1111_CLK");
633 if (!sachip->clk) { 633 if (IS_ERR(sachip->clk)) {
634 ret = PTR_ERR(sachip->clk); 634 ret = PTR_ERR(sachip->clk);
635 goto err_free; 635 goto err_free;
636 } 636 }