public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"jiri@nvidia.com" <jiri@nvidia.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net] net: dsa: fix wrong pointer passed to PTR_ERR() in dsa_port_phylink_create()
Date: Sat, 8 Oct 2022 13:06:40 +0000	[thread overview]
Message-ID: <20221008130639.6nhumidbbw5duesd@skbuf> (raw)
In-Reply-To: <20221008083942.3244411-1-yangyingliang@huawei.com> <20221008083942.3244411-1-yangyingliang@huawei.com>

On Sat, Oct 08, 2022 at 04:39:42PM +0800, Yang Yingliang wrote:
> Fix wrong pointer passed to PTR_ERR() in dsa_port_phylink_create() to print
> error message.
> 
> Fixes: cf5ca4ddc37a ("net: dsa: don't leave dangling pointers in dp->pl when failing")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Thanks!

>  net/dsa/port.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/dsa/port.c b/net/dsa/port.c
> index e4a0513816bb..208168276995 100644
> --- a/net/dsa/port.c
> +++ b/net/dsa/port.c
> @@ -1681,7 +1681,7 @@ int dsa_port_phylink_create(struct dsa_port *dp)
>  	pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
>  			    mode, &dsa_port_phylink_mac_ops);
>  	if (IS_ERR(pl)) {
> -		pr_err("error creating PHYLINK: %ld\n", PTR_ERR(dp->pl));
> +		pr_err("error creating PHYLINK: %ld\n", PTR_ERR(pl));
>  		return PTR_ERR(pl);
>  	}
>  
> -- 
> 2.25.1
>

  reply	other threads:[~2022-10-08 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  8:39 [PATCH net] net: dsa: fix wrong pointer passed to PTR_ERR() in dsa_port_phylink_create() Yang Yingliang
2022-10-08 13:06 ` Vladimir Oltean [this message]
2022-10-09 19:10 ` patchwork-bot+netdevbpf

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=20221008130639.6nhumidbbw5duesd@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=yangyingliang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox