[PATCH net-next 2/3] net: airoha: Add airoha_ppe_dev struct definition

Lorenzo Bianconi lorenzo at kernel.org
Fri Aug 22 07:26:06 PDT 2025


On Aug 22, Jakub Kicinski wrote:
> On Fri, 22 Aug 2025 08:58:25 +0200 Lorenzo Bianconi wrote:
> > > On Tue, 19 Aug 2025 14:21:07 +0200 Lorenzo Bianconi wrote:  
> > > > +	pdev = of_find_device_by_node(np);
> > > > +  
> > > 
> > > did you mean to put the of_node_put() here?
> > >   
> > > > +	if (!pdev) {
> > > > +		dev_err(dev, "cannot find device node %s\n", np->name);
> > > > +		of_node_put(np);
> > > > +		return ERR_PTR(-ENODEV);
> > > > +	}
> > > > +	of_node_put(np);  
> > 
> > I moved the of_node_put() here (and in the if branch) in order to fix a similar
> > issue fixed by Alok for airoha_npu.
> 
> Ah, didn't notice it in the print..
> maybe remove the empty line between the of_find_device.. and the null
> check on pdev then?

I am fine with it. I did it this way just to be consistent with NPU code:
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/airoha/airoha_npu.c#L403
Do you want me to post v3?

Regards,
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250822/f12606eb/attachment.sig>


More information about the linux-arm-kernel mailing list