RE: [PATCH v2 02/10] net: ethernet: ixgbe: don't call devm_mdiobus_free()

From: Kirsher, Jeffrey T
Date: Mon Jun 29 2020 - 14:59:10 EST


> -----Original Message-----
> From: Bartosz Golaszewski <brgl@xxxxxxxx>
> Sent: Monday, June 29, 2020 05:04
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@xxxxxxxxx>; David S . Miller
> <davem@xxxxxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; John Crispin
> <john@xxxxxxxxxxx>; Sean Wang <sean.wang@xxxxxxxxxxxx>; Mark Lee
> <Mark-MC.Lee@xxxxxxxxxxxx>; Matthias Brugger
> <matthias.bgg@xxxxxxxxx>; Heiner Kallweit <hkallweit1@xxxxxxxxx>; Andrew
> Lunn <andrew@xxxxxxx>; Florian Fainelli <f.fainelli@xxxxxxxxx>; Russell King
> <linux@xxxxxxxxxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>; Frank Rowand
> <frowand.list@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; linux-mediatek@xxxxxxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; Bartosz Golaszewski
> <bgolaszewski@xxxxxxxxxxxx>
> Subject: [PATCH v2 02/10] net: ethernet: ixgbe: don't call
> devm_mdiobus_free()
>
> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> The idea behind devres is that the release callbacks are called if probe fails. As
> we now check the return value of ixgbe_mii_bus_init(), we can drop the call
> devm_mdiobus_free() in error path as the release callback will be called
> automatically.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>

Acked-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>

> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)