clk: tegra: dfll: Fix a potential Oop in remove()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 18 Dec 2018 08:22:41 +0000 (11:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2019 16:58:46 +0000 (17:58 +0100)
commitacc934f576919d151b25824ba9cdc59d874aba65
tree1e1fca4b473ee265661aa44d23f42071b68f389a
parent651023ed93ab916efdfd1ced67e4b2d96601a405
clk: tegra: dfll: Fix a potential Oop in remove()

[ Upstream commit d39eca547f3ec67140a5d765a426eb157b978a59 ]

If tegra_dfll_unregister() fails then "soc" is an error pointer.  We
should just return instead of dereferencing it.

Fixes: 1752c9ee23fb ("clk: tegra: dfll: Fix drvdata overwriting issue")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/tegra/clk-tegra124-dfll-fcpu.c