[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a041ba1-50f1-7f82-8f70-96d4d0e532d6@boundarydevices.com>
Date: Wed, 3 Jan 2018 12:03:12 -0800
From: Troy Kisky <troy.kisky@...ndarydevices.com>
To: Fugang Duan <fugang.duan@....com>, festevam@...il.com,
davem@...emloft.net
Cc: netdev@...r.kernel.org, andrew@...n.ch
Subject: Re: [PATCH v2 net,stable 1/2] net: fec: restore dev_id in the cases
of probe error
On 1/2/2018 6:39 PM, Fugang Duan wrote:
> The static variable dev_id always plus one before netdev registerred.
> It should restore the dev_id value in the cases of probe error.
>
> Signed-off-by: Fugang Duan <fugang.duan@....com>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index e17d10b..dae89bc 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3576,6 +3576,7 @@ static int fec_enet_get_irq_cnt(struct platform_device *pdev)
> of_node_put(phy_node);
> failed_ioremap:
> free_netdev(ndev);
> + dev_id--;
This should be before failed_ioremap.
>
> return ret;
> }
>
Powered by blists - more mailing lists