[PATCH net-next 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Sun Apr 2 22:52:21 PDT 2023
Hello Simon,
On Sun, Apr 02, 2023 at 07:02:26PM +0200, Simon Horman wrote:
> On Sun, Apr 02, 2023 at 04:30:16PM +0200, Uwe Kleine-König wrote:
> > The function returns zero unconditionally. Change it to return void
> > instead which simplifies one caller as error handing becomes
> > unnecessary.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
>
> ...
>
> > @@ -267,9 +265,7 @@ static int visconti_eth_dwmac_remove(struct platform_device *pdev)
> >
> > stmmac_pltfr_remove(pdev);
> >
> > - err = visconti_eth_clock_remove(pdev);
> > - if (err < 0)
> > - dev_err(&pdev->dev, "failed to remove clock: %d\n", err);
> > + visconti_eth_clock_remove(pdev);
> >
> > stmmac_remove_config_dt(pdev, priv->plat);
>
> err is now returned uninitialised by this function.
Good catch. Indeed err must be removed in this patch and return err
replaced by return 0. I'll send a v2 later this week, waiting a bit for
further feedback.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230403/5db77c09/attachment.sig>
More information about the linux-arm-kernel
mailing list