All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Alexander A Sverdlin <alexander.sverdlin@nokia.com>
Cc: devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Ralf Baechle <ralf@linux-mips.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2 net] staging: octeon: repair "fixed-link" support
Date: Sat, 17 Oct 2020 22:45:34 +0200	[thread overview]
Message-ID: <20201017204534.GS456889@lunn.ch> (raw)
In-Reply-To: <20201016101858.11374-1-alexander.sverdlin@nokia.com>

> +			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

  parent reply	other threads:[~2020-10-17 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 10:18 [PATCH v2 net] staging: octeon: repair "fixed-link" support Alexander A Sverdlin
2020-10-16 10:18 ` [PATCH v2 net] staging: octeon: Drop on uncorrectable alignment or FCS error Alexander A Sverdlin
2020-10-16 11:17   ` Greg Kroah-Hartman
2020-10-16 13:14   ` Greg Kroah-Hartman
2020-10-17 21:02   ` Andrew Lunn
2020-10-19  9:11     ` Alexander Sverdlin
2020-10-25  9:22   ` Greg Kroah-Hartman
2020-10-17 20:45 ` Andrew Lunn [this message]
2020-10-17 20:48 ` [PATCH v2 net] staging: octeon: repair "fixed-link" support Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201017204534.GS456889@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=aaro.koskinen@iki.fi \
    --cc=alexander.sverdlin@nokia.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.