[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201017204534.GS456889@lunn.ch>
Date: Sat, 17 Oct 2020 22:45:34 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Alexander A Sverdlin <alexander.sverdlin@...ia.com>
Cc: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Aaro Koskinen <aaro.koskinen@....fi>,
Ralf Baechle <ralf@...ux-mips.org>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net] staging: octeon: repair "fixed-link" support
> + if (priv->of_node && of_phy_is_fixed_link(priv->of_node)) {
> + if (of_phy_register_fixed_link(priv->of_node)) {
> + netdev_err(dev, "Failed to register fixed link for interface %d, port %d\n",
> + interface, priv->port);
> + dev->netdev_ops = NULL;
> + }
> + }
> +
> if (!dev->netdev_ops) {
> free_netdev(dev);
Setting dev->netdev_ops to NULL to indicate an error is pretty
odd. But this is staging. How about cleaning this
up. of_phy_register_fixed_link() returns an -errno which you should
return.
Andrew
Powered by blists - more mailing lists