Re: [PATCH] net: prestera: initialize err in prestera_port_sfp_bind
From: Andrew Lunn
Date: Wed Jun 17 2026 - 14:44:28 EST
On Thu, Jun 18, 2026 at 02:22:14AM +0800, Ruoyu Wang wrote:
> prestera_port_sfp_bind() returns err after walking the ports node. If no
> child node matches the port's front-panel id, err is never assigned.
> Initialize it to 0 so the no-match path does not return stack data.
Why 0, and not -ENODEV? Please include an explanation of your choice
in the commit message.
Please also take a read of
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
You need to indicate the tree this patch is for in the Subject:
Andrew
---
pw-bot: cr