diff options
author | Stephen Boyd <sboyd@kernel.org> | 2020-09-24 02:41:44 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2020-10-08 04:08:38 +0200 |
commit | b608f11d49ec671739604cc763248d8e8fadbbeb (patch) | |
tree | cf50589379935c8d5c5bf26935297e8101e342eb /include/dt-bindings/clock | |
parent | Merge tag 'v5.10-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-b608f11d49ec671739604cc763248d8e8fadbbeb.tar.xz linux-b608f11d49ec671739604cc763248d8e8fadbbeb.zip |
clk: rockchip: Initialize hw to error to avoid undefined behavior
We can get down to this return value from ERR_CAST() without
initializing hw. Set it to -ENOMEM so that we always return something
sane.
Fixes the following smatch warning:
drivers/clk/rockchip/clk-half-divider.c:228 rockchip_clk_register_halfdiv() error: uninitialized symbol 'hw'.
drivers/clk/rockchip/clk-half-divider.c:228 rockchip_clk_register_halfdiv() warn: passing zero to 'ERR_CAST'
Cc: Elaine Zhang <zhangqing@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Fixes: 956060a52795 ("clk: rockchip: add support for half divider")
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include/dt-bindings/clock')
0 files changed, 0 insertions, 0 deletions