linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] enetc: Fix inconsistent IS_ERR and PTR_ERR
@ 2020-01-07 14:14 YueHaibing
  2020-01-07 14:17 ` Vladimir Oltean
  2020-01-07 21:47 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-01-07 14:14 UTC (permalink / raw)
  To: claudiu.manoil, davem, vladimir.oltean; +Cc: netdev, linux-kernel, YueHaibing

The proper pointer to be passed as argument is hw
Detected using Coccinelle.

Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 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 87c0e96..ebc635f 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.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] enetc: Fix inconsistent IS_ERR and PTR_ERR
  2020-01-07 14:14 [PATCH net-next] enetc: Fix inconsistent IS_ERR and PTR_ERR YueHaibing
@ 2020-01-07 14:17 ` Vladimir Oltean
  2020-01-07 21:47 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Oltean @ 2020-01-07 14:17 UTC (permalink / raw)
  To: YueHaibing; +Cc: Claudiu Manoil, David S. Miller, Vladimir Oltean, netdev, lkml

On Tue, 7 Jan 2020 at 16:16, YueHaibing <yuehaibing@huawei.com> wrote:
>
> The proper pointer to be passed as argument is hw
> Detected using Coccinelle.
>
> Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---

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

Thanks a lot!

>  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 87c0e96..ebc635f 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.7.4
>
>

-Vladimir

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] enetc: Fix inconsistent IS_ERR and PTR_ERR
  2020-01-07 14:14 [PATCH net-next] enetc: Fix inconsistent IS_ERR and PTR_ERR YueHaibing
  2020-01-07 14:17 ` Vladimir Oltean
@ 2020-01-07 21:47 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-01-07 21:47 UTC (permalink / raw)
  To: yuehaibing; +Cc: claudiu.manoil, vladimir.oltean, netdev, linux-kernel

From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 7 Jan 2020 22:14:54 +0800

> The proper pointer to be passed as argument is hw
> Detected using Coccinelle.
> 
> Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-07 21:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 14:14 [PATCH net-next] enetc: Fix inconsistent IS_ERR and PTR_ERR YueHaibing
2020-01-07 14:17 ` Vladimir Oltean
2020-01-07 21:47 ` David Miller

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).