clk: sprd: Don't reference clk_init_data after registration
authorStephen Boyd <sboyd@kernel.org>
Wed, 31 Jul 2019 19:35:15 +0000 (12:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:56:45 +0000 (18:56 +0200)
commitefa0fe4cde0548bc702efd95572ff1b3e96fedc6
treea0fbe906333346840feb55c52e3e3eaf76be6c0d
parent89dc59fb267d6d3a0d47fe8480982b451e06831f
clk: sprd: Don't reference clk_init_data after registration

[ Upstream commit f6c90df8e7e33c3dc33d4d7471bc42c232b0510e ]

A future patch is going to change semantics of clk_register() so that
clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid
referencing this member here so that we don't run into NULL pointer
exceptions.

Cc: Chunyan Zhang <zhang.chunyan@linaro.org>
Cc: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20190731193517.237136-8-sboyd@kernel.org
Acked-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/sprd/common.c