]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM / clk: don't return int on __pm_clk_enable()
authorColin Ian King <colin.king@canonical.com>
Mon, 29 Jun 2015 21:13:38 +0000 (22:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:05:31 +0000 (10:05 -0700)
commit2c0a3f6ee3f768a4cc3462b532ce38ae5cbbf22c
tree0957f4736cf57d6111f7ad9770cadf32529980ab
parentb248fcf1cedcb427ccfd7a09a1b56b3c50190f81
PM / clk: don't return int on __pm_clk_enable()

commit f4745a92781b872455f32feb01d1dce92aefcb6c upstream.

Static analysis by cppcheck found an issue that was recently introduced by
commit 471f7707b6f0b1 ("PM / clock_ops: make __pm_clk_enable more generic")
where a return status in ret was not being initialised and garbage
being returned when ce->status >= PCE_STATUS_ERROR.

The fact that ret is not being checked by the caller and that
ret is only used internally __pm_clk_enable() to check if clk_enable()
was OK means we can ignore returning it instead turn
__pm_clk_enable() into function with a void return.

Fixes: 471f7707b6f0b1 ("PM / clock_ops: make __pm_clk_enable more generic")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/clock_ops.c