* [PATCH 01/14] avr32/mach-at32ap/clock: check return code of clk_get
@ 2010-09-05 18:32 Kulikov Vasiliy
0 siblings, 0 replies; only message in thread
From: Kulikov Vasiliy @ 2010-09-05 18:32 UTC (permalink / raw)
To: kernel-janitors; +Cc: Vasiliy Kulikov, Haavard Skinnemoen, linux-kernel
From: Vasiliy Kulikov <segooon@gmail.com>
Function clk_get may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
arch/avr32/mach-at32ap/clock.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c
index 442f08c..133a475 100644
--- a/arch/avr32/mach-at32ap/clock.c
+++ b/arch/avr32/mach-at32ap/clock.c
@@ -258,14 +258,20 @@ static int clk_show(struct seq_file *s, void *unused)
/* show clock tree as derived from the three oscillators */
clk = clk_get(NULL, "osc32k");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
dump_clock(clk, &r);
clk_put(clk);
clk = clk_get(NULL, "osc0");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
dump_clock(clk, &r);
clk_put(clk);
clk = clk_get(NULL, "osc1");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
dump_clock(clk, &r);
clk_put(clk);
--
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-05 18:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-05 18:32 [PATCH 01/14] avr32/mach-at32ap/clock: check return code of clk_get Kulikov Vasiliy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox