drivers: sh: clk: Avoid crashes when passing NULL clocks
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 19 Nov 2015 18:32:06 +0000 (19:32 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 24 Nov 2015 02:49:18 +0000 (11:49 +0900)
commit6575a9c69a211ac1cf454f9c76be54f7a5fae9fe
tree8a4cd82a6df5e6362152c1438ce5dbc6c79383c9
parent90069ad1b602d05740ed0fc5f72f09a616ceddd0
drivers: sh: clk: Avoid crashes when passing NULL clocks

Several clock API functions handle NULL clocks when the Common Clock
Framework is used, while their legacy SH counterparts don't, and would
just crash when a NULL clock is passed.

Add NULL checks to clk_get_rate(), clk_set_rate(), clk_get_parent(), and
clk_round_rate(), to avoid different behavior in drivers shared between
legacy and CCF-based platforms.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/sh/clk/core.c
This page took 0.026169 seconds and 5 git commands to generate.