All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Grant Grundler <grundler@chromium.org>
Cc: Oleksij Rempel <linux@rempel-privat.de>,
	Pavel Skripkin <paskripkin@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Eizan Miyamoto <eizan@chromium.org>,
	netdev <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Anton Lundin <glance@acc.umu.se>
Subject: Re: [PATCHv4 net] net: asix: fix modprobe "sysfs: cannot create duplicate filename"
Date: Wed, 15 Mar 2023 22:08:22 -0700	[thread overview]
Message-ID: <20230315220822.6d8cf7ed@kernel.org> (raw)
In-Reply-To: <20230314055410.3329480-1-grundler@chromium.org>

On Mon, 13 Mar 2023 22:54:10 -0700 Grant Grundler wrote:
> @@ -690,6 +704,7 @@ static int ax88772_init_phy(struct usbnet *dev)
>  	priv->phydev = mdiobus_get_phy(priv->mdio, priv->phy_addr);
>  	if (!priv->phydev) {
>  		netdev_err(dev->net, "Could not find PHY\n");
> +		ax88772_mdio_unregister(priv);

this line needs to go now..

>  		return -ENODEV;

.. since if we return error here ..

>  	}
>  
> @@ -896,16 +911,23 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
>  
>  	ret = ax88772_init_mdio(dev);
>  	if (ret)
> -		return ret;
> +		goto mdio_err;
>  
>  	ret = ax88772_phylink_setup(dev);
>  	if (ret)
> -		return ret;
> +		goto phylink_err;
>  
>  	ret = ax88772_init_phy(dev);

.. it will pop out here ..

>  	if (ret)
> -		phylink_destroy(priv->phylink);
> +		goto initphy_err;
>  
> +	return 0;
> +
> +initphy_err:
> +	phylink_destroy(priv->phylink);
> +phylink_err:
> +	ax88772_mdio_unregister(priv);

.. and then call ax88772_mdio_unregister() a second time.

> +mdio_err:
>  	return ret;
>  }

  parent reply	other threads:[~2023-03-16  5:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  5:54 [PATCHv4 net] net: asix: fix modprobe "sysfs: cannot create duplicate filename" Grant Grundler
2023-03-14 13:22 ` Michal Swiatkowski
2023-03-16  5:08 ` Jakub Kicinski [this message]
2023-03-17 17:58   ` Grant Grundler

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=20230315220822.6d8cf7ed@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=eizan@chromium.org \
    --cc=glance@acc.umu.se \
    --cc=grundler@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=lukas@wunner.de \
    --cc=netdev@vger.kernel.org \
    --cc=paskripkin@gmail.com \
    /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.