Re: [PATCH] net: dsa: bcm_sf2: fix missing clk_disable_unprepare() in error paths
From: Florian Fainelli
Date: Mon Mar 16 2026 - 19:17:42 EST
On 3/16/26 06:25, Anas Iqbal wrote:
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: e9ec5c3bd238 ("net: dsa: bcm_sf2: request and handle clocks")
Reviewed-by: Jonas Gorski <jonas.gorski@xxxxxxxxx>
Signed-off-by: Anas Iqbal <mohd.abd.6602@xxxxxxxxx>
Subject should be "PATCH net", and you would want to wait 24 hrs before re-submitting, with that:
Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian