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

From: Rosen Penev

Date: Tue Aug 04 2026 - 16:56:18 EST


On Tue, Aug 4, 2026 at 4:00 AM Paolo Abeni <pabeni@xxxxxxxxxx> 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
>