]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 11 May 2023 17:01:20 +0000 (20:01 +0300)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:19:45 +0000 (17:19 +0200)
commit882f1e9cb700903147711c2b2c335e5f314cb2d8
tree65bb5faa4367de0a4e718a9f525b7a79c5a52eb4
parent3a11d844ab0cc38e4dbc978d32715fca52ee9197
clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider()

BugLink: https://bugs.launchpad.net/bugs/2034469
[ Upstream commit 9c632a6396505a019ea6d12b5ab45e659a542a93 ]

Smatch detected this potential error pointer dereference
clk_wzrd_register_divider().  If devm_clk_hw_register() fails then
it sets "hw" to an error pointer and then dereferences it on the
next line.  Return the error directly instead.

Fixes: 5a853722eb32 ("staging: clocking-wizard: Add support for dynamic reconfiguration")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/f0e39b5c-4554-41e0-80d9-54ca3fabd060@kili.mountain
Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/clk/xilinx/clk-xlnx-clock-wizard.c