linux/drivers/base/power
Geert Uytterhoeven 3fc3a0be0d PM / clk: Fix clock error check in __pm_clk_add()
In the final iteration of commit 245bd6f6af ("PM / clock_ops: Add
pm_clk_add_clk()"), a refcount increment was added by Grygorii Strashko.
However, the accompanying IS_ERR() check operates on the wrong clock
pointer, which is always zero at this point, i.e. not an error.
This may lead to a NULL pointer dereference later, when __clk_get()
tries to dereference an error pointer.

Check the passed clock pointer instead to fix this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Fixes: 245bd6f6af ("PM / clock_ops: Add pm_clk_add_clk()")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-19 15:13:19 +02:00
..
clock_ops.c PM / clk: Fix clock error check in __pm_clk_add() 2015-05-19 15:13:19 +02:00
common.c PM: Convert dev_pm_put_subsys_data() into a void function 2015-02-03 22:59:25 +01:00
domain_governor.c PM: Drop CONFIG_PM_RUNTIME from the driver core 2014-12-04 00:46:58 +01:00
domain.c PM / domains: avoid potential oops in pm_genpd_remove_device() 2015-03-23 23:20:28 +01:00
generic_ops.c PM / Runtime: Spelling s/competing/completing/ 2014-03-26 16:33:53 +01:00
main.c PM / sleep: add pm-trace support for suspending phase 2015-03-18 15:54:27 +01:00
Makefile PM: Add pm_runtime_suspend|resume_force functions 2014-03-02 00:18:15 +01:00
opp.c PM / OPP / clk: Remove unnecessary OOM message 2015-02-12 02:00:52 +01:00
power.h PM: Drop CONFIG_PM_RUNTIME from the driver core 2014-12-04 00:46:58 +01:00
qos.c PM / QoS: Use lockdep asserts to find missing hold of power.lock 2015-01-23 22:31:08 +01:00
runtime.c PM: Drop CONFIG_PM_RUNTIME from the driver core 2014-12-04 00:46:58 +01:00
sysfs.c PM: Drop CONFIG_PM_RUNTIME from the driver core 2014-12-04 00:46:58 +01:00
trace.c PM / sleep: add pm-trace support for suspending phase 2015-03-18 15:54:27 +01:00
wakeup.c power: wakeup: remove use of seq_printf return value 2015-04-15 16:35:24 -07:00