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

From: Paolo Abeni

Date: Wed Aug 05 2026 - 03:28:52 EST


On 8/4/26 10:55 PM, Rosen Penev wrote:
> 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.
Ah, it was not obvious to me. Restoring the patch in PW. For the future
please see net-next commit bd5c24e4001d.

/P