Re: [PATCHv3 net-next] net: dsa: b53: srab: propagate errors from init helpers

Rosen Penev <[email protected]> Tue, 4 Aug 2026 13:55:46 -0700
Newsgroups gmane.linux.kernel,gmane.linux.network
Message-ID <CAKxU2N_hCnbJRRtP5bqVVRavORZVk-1UbKMEZ6s-FhjkDEbMUA@mail.gmail.com>
On Tue, Aug 4, 2026 at 4:00 AM Paolo Abeni <[email protected]> wrote:
>
> On 7/29/26 10:29 PM, Rosen Penev wrote:
> > -static void b53_srab_mux_init(struct platform_device *pdev)
> > +static int b53_srab_mux_init(struct platform_device *pdev)
> >  {
> >       struct b53_device *dev = platform_get_drvdata(pdev);
> >       struct b53_srab_priv *priv = dev->priv;
> >       struct b53_srab_port_priv *p;
> > +     void __iomem *mux_config;
> >       unsigned int port;
> >       u32 reg, off = 0;
> >       int ret;
> >
> > -     if (dev->pdata && dev->pdata->chip_id != BCM58XX_DEVICE_ID)
> > -             return;
> > +     if (!dev->pdata || dev->pdata->chip_id != BCM58XX_DEVICE_ID)
> > +             return 0;
> >
> > -     priv->mux_config = devm_platform_ioremap_resource(pdev, 1);
> > -     if (IS_ERR(priv->mux_config))
> > -             return;
> > +     mux_config = devm_platform_ioremap_resource(pdev, 1);
> > +     if (IS_ERR(mux_config))
> > +             return PTR_ERR(mux_config);
>
> Sashiko noted this strict checking may cause regression on previously
> working setup:
>
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260729202953.704662-1-rosenp%40gmail.com
It mentions this only applying to out of tree dtbs.
>
> /P
>