netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	netdev <netdev@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] enetc: enetc_pci_mdio: Fix inconsistent IS_ERR and PTR_ERR
Date: Wed, 8 Jan 2020 10:45:26 +0200	[thread overview]
Message-ID: <CA+h21hrhWDF6-nWVqkbYc5xFvfR6R6bEiimdRB5rRwXmceZEYA@mail.gmail.com> (raw)
In-Reply-To: <20200108062151.GA2614@embeddedor>

Hi Gustavo,

On Wed, 8 Jan 2020 at 08:41, Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
>
> Fix inconsistent IS_ERR and PTR_ERR in enetc_pci_mdio_probe().
>
> The proper pointer to be passed as argument is hw.
>
> This bug was detected with the help of Coccinelle.
>
> Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

This was fixed yesterday:

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=4addbcb387c9519b320a9411cad68f0c01e9ed4b

>  drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> index 87c0e969da40..ebc635f8a4cc 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> @@ -27,7 +27,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
>         }
>
>         hw = enetc_hw_alloc(dev, port_regs);
> -       if (IS_ERR(enetc_hw_alloc)) {
> +       if (IS_ERR(hw)) {
>                 err = PTR_ERR(hw);
>                 goto err_hw_alloc;
>         }
> --
> 2.23.0
>

Thanks,
-Vladimir

      reply	other threads:[~2020-01-08  8:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  6:21 [PATCH net-next] enetc: enetc_pci_mdio: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2020-01-08  8:45 ` Vladimir Oltean [this message]

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=CA+h21hrhWDF6-nWVqkbYc5xFvfR6R6bEiimdRB5rRwXmceZEYA@mail.gmail.com \
    --to=olteanv@gmail.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=gustavo@embeddedor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@nxp.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;
as well as URLs for NNTP newsgroup(s).