linux/drivers/clk
Fengguang Wu e47c6a3408 clk: validate pointer in __clk_disable()
clk_get() returns -ENOENT on error and some careless caller might
dereference it without error checking:

In mxc_rnga_remove():

        struct clk *clk = clk_get(&pdev->dev, "rng");

	// ...

        clk_disable(clk);

Since it's insane to audit the lots of existing and future clk users,
let's add a check in the callee to avoid kernel panic and warn about
any buggy user.

Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: viresh kumar <viresh.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-30 17:25:13 -07:00
..
mxs Merge branch 'clk/mxs-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6 into clk-next 2012-07-12 09:48:19 -07:00
socfpga ARM: socfpga: initial support for Altera's SOCFPGA platform 2012-07-19 10:39:00 +02:00
spear Clk: SPEAr1340: Update sys clock parent array 2012-07-18 10:04:53 +05:30
versatile ARM: integrator: convert to common clock 2012-07-11 17:58:45 -07:00
Kconfig clk: remove redundant depends on from drivers/Kconfig 2012-07-30 17:25:12 -07:00
Makefile The common clk framework changes for 3.6 include a small number of core 2012-07-24 16:40:57 -07:00
clk-divider.c clk: Add CLK_IS_BASIC flag to identify basic clocks 2012-07-11 15:36:43 -07:00
clk-fixed-factor.c clk: Add CLK_IS_BASIC flag to identify basic clocks 2012-07-11 15:36:43 -07:00
clk-fixed-rate.c clk: add DT fixed-clock binding support 2012-07-11 17:58:46 -07:00
clk-gate.c clk: Add CLK_IS_BASIC flag to identify basic clocks 2012-07-11 15:36:43 -07:00
clk-highbank.c clk: add highbank clock support 2012-07-11 17:58:47 -07:00
clk-mux.c clk: Add CLK_IS_BASIC flag to identify basic clocks 2012-07-11 15:36:43 -07:00
clk-nomadik.c ARM: nomadik: convert to generic clock 2012-06-10 18:41:40 +02:00
clk-u300.c ARM: u300: convert to common clock 2012-07-11 15:36:45 -07:00
clk-wm831x.c clk: wm831x: Add initial WM831x clock driver 2012-07-11 15:36:44 -07:00
clk.c clk: validate pointer in __clk_disable() 2012-07-30 17:25:13 -07:00
clkdev.c clk: fix compile for OF && !COMMON_CLK 2012-07-19 14:07:56 -07:00