Skip to contentSkip to conversation

arm: omap2: io: fix clk_get() error check

PATCH New Aaro Koskinen 3 participants 3 messages Nov 30, 2010 – Dec 3, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: omap2: io: fix clk_get() error check

clk_get() return value should be checked with IS_ERR().

---
 arch/arm/mach-omap2/io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/io.c +1 -1
index 40562dd..a1939b1 100644
@@ -297,7 +297,7 @@ static int __init _omap2_init_reprogram_sdrc(void)
 		return 0;
 
 	dpll3_m2_ck = clk_get(NULL, "dpll3_m2_ck");
-	if (!dpll3_m2_ck)
+	if (IS_ERR(dpll3_m2_ck))
 		return -EINVAL;
 
 	rate = clk_get_rate(dpll3_m2_ck);
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 arm: omap2: io: fix clk_get() error check

Quoted 3 lines · Aaro Koskinen

clk_get() return value should be checked with IS_ERR().

Quoted 17 lines
---
 arch/arm/mach-omap2/io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/io.c +1 -1
index 40562dd..a1939b1 100644
@@ -297,7 +297,7 @@ static int __init _omap2_init_reprogram_sdrc(void)
 		return 0;
 
 	dpll3_m2_ck = clk_get(NULL, "dpll3_m2_ck");
-	if (!dpll3_m2_ck)
+	if (IS_ERR(dpll3_m2_ck))
 		return -EINVAL;
 
 	rate = clk_get_rate(dpll3_m2_ck);