Skip to content

Commit 47d2021

Browse files
GustavoARSilvadavem330
authored andcommitted
net: phy: mscc: fix memory leak in vsc8574_config_pre_init
In case memory resources for *fw* were successfully allocated, release them before return. Addresses-Coverity-ID: 1473968 ("Resource leak") Fixes: 00d70d8 ("net: phy: mscc: add support for VSC8574 PHY") Reviewed-by: Quentin Schulz <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e519869 commit 47d2021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/mscc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ static int vsc8574_config_pre_init(struct phy_device *phydev)
12921292
dev_err(dev,
12931293
"%s: failed to assert reset of micro\n",
12941294
__func__);
1295-
return ret;
1295+
goto out;
12961296
}
12971297
}
12981298
} else {

0 commit comments

Comments
 (0)