Commit 6ab68b4
net: dsa: bcm_sf2: fix missing clk_disable_unprepare() in error paths
[ Upstream commit b487318 ]
Smatch reports:
drivers/net/dsa/bcm_sf2.c:997 bcm_sf2_sw_resume() warn:
'priv->clk' from clk_prepare_enable() not released on lines: 983,990.
The clock enabled by clk_prepare_enable() in bcm_sf2_sw_resume()
is not released if bcm_sf2_sw_rst() or bcm_sf2_cfp_resume() fails.
Add the missing clk_disable_unprepare() calls in the error paths
to properly release the clock resource.
Fixes: e9ec5c3 ("net: dsa: bcm_sf2: request and handle clocks")
Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Anas Iqbal <mohd.abd.6602@gmail.com>
Link: https://patch.msgid.link/20260318084212.1287-1-mohd.abd.6602@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 719f678 commit 6ab68b4
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| 983 | + | |
| 984 | + | |
983 | 985 | | |
984 | 986 | | |
985 | 987 | | |
986 | 988 | | |
987 | 989 | | |
988 | 990 | | |
989 | | - | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
990 | 994 | | |
991 | | - | |
| 995 | + | |
992 | 996 | | |
993 | 997 | | |
994 | 998 | | |
| |||
0 commit comments