linux/drivers/staging/clocking-wizard
Dan Carpenter 2f276dd9c0 clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider()
[ Upstream commit 9c632a6396 ]

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: 5a853722eb ("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>
History 2023-07-23 13:47:07 +02:00
..
clk-xlnx-clock-wizard.c clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider() 2023-07-23 13:47:07 +02:00
dt-binding.txt staging: Replace HTTP links with HTTPS ones 2020-07-20 10:22:47 +02:00
Kconfig clk: staging: correct reference to config IOMEM to config HAS_IOMEM 2021-08-17 20:03:00 +02:00
Makefile staging: add missing SPDX lines to Makefile files 2019-04-03 11:10:15 +02:00
TODO staging: Replace lkml.org links with lore 2021-02-11 12:13:53 +01:00