lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1283711535-7082-1-git-send-email-segooon@gmail.com>
Date:	Sun,  5 Sep 2010 22:32:15 +0400
From:	Kulikov Vasiliy <segooon@...il.com>
To:	kernel-janitors@...r.kernel.org
Cc:	Vasiliy Kulikov <segooon@...il.com>,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 01/14] avr32/mach-at32ap/clock: check return code of clk_get

From: Vasiliy Kulikov <segooon@...il.com>

Function clk_get may return ERR_PTR(...). Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ