Re: [PATCH net]: bcmsysport: fix call balance of priv->clk handling routines

From: Florian Fainelli
Date: Mon Dec 30 2024 - 14:15:11 EST


On 12/27/24 04:30, Vitalii Mordan wrote:
Check the return value of clk_prepare_enable to ensure that priv->clk has
been successfully enabled.

If priv->clk was not enabled during bcm_sysport_probe, bcm_sysport_resume,
or bcm_sysport_open, it must not be disabled in any subsequent execution
paths.

Found by Linux Verification Center (linuxtesting.org) with Klever.

Fixes: 31bc72d97656 ("net: systemport: fetch and use clock resources")
Signed-off-by: Vitalii Mordan <mordan@xxxxxxxxx>

Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian