From: Fugang Duan <fugang.duan@nxp.com>
To: <festevam@gmail.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <troy.kisky@boundarydevices.com>,
<andrew@lunn.ch>, <fugang.duan@nxp.com>
Subject: [PATCH v2 net,stable 1/2] net: fec: restore dev_id in the cases of probe error
Date: Wed, 3 Jan 2018 10:39:29 +0800 [thread overview]
Message-ID: <1514947170-8887-2-git-send-email-fugang.duan@nxp.com> (raw)
In-Reply-To: <1514947170-8887-1-git-send-email-fugang.duan@nxp.com>
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@nxp.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--;
return ret;
}
--
1.9.1
next prev parent reply other threads:[~2018-01-03 2:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 2:39 [PATCH v2 net,stable 0/2] net: fec: clean up in the cases of probe error Fugang Duan
2018-01-03 2:39 ` Fugang Duan [this message]
2018-01-03 20:03 ` [PATCH v2 net,stable 1/2] net: fec: restore dev_id " Troy Kisky
2018-01-03 2:39 ` [PATCH v2 net,stable 2/2] net: fec: defer probe if regulator is not ready Fugang Duan
2018-01-03 16:40 ` [PATCH v2 net,stable 0/2] net: fec: clean up in the cases of probe error David Miller
2018-01-04 2:07 ` Andy Duan
2018-01-04 2:20 ` David Miller
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=1514947170-8887-2-git-send-email-fugang.duan@nxp.com \
--to=fugang.duan@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=festevam@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=troy.kisky@boundarydevices.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