* [PATCH net-next v1] ethernet: ks8842: delete unnecessary goto label
@ 2020-04-25 11:56 Dejin Zheng
2020-04-27 18:15 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Dejin Zheng @ 2020-04-25 11:56 UTC (permalink / raw)
To: davem, tglx, netdev; +Cc: linux-kernel, Dejin Zheng
the label of err_register is not necessary, so delete it to
simplify code.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/net/ethernet/micrel/ks8842.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8842.c b/drivers/net/ethernet/micrel/ks8842.c
index f3f6dfe3eddc..213ca33a9967 100644
--- a/drivers/net/ethernet/micrel/ks8842.c
+++ b/drivers/net/ethernet/micrel/ks8842.c
@@ -1204,7 +1204,7 @@ static int ks8842_probe(struct platform_device *pdev)
strcpy(netdev->name, "eth%d");
err = register_netdev(netdev);
if (err)
- goto err_register;
+ goto err_get_irq;
platform_set_drvdata(pdev, netdev);
@@ -1213,7 +1213,6 @@ static int ks8842_probe(struct platform_device *pdev)
return 0;
-err_register:
err_get_irq:
iounmap(adapter->hw_addr);
err_ioremap:
--
2.25.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v1] ethernet: ks8842: delete unnecessary goto label
2020-04-25 11:56 [PATCH net-next v1] ethernet: ks8842: delete unnecessary goto label Dejin Zheng
@ 2020-04-27 18:15 ` David Miller
2020-04-28 2:58 ` Dejin Zheng
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2020-04-27 18:15 UTC (permalink / raw)
To: zhengdejin5; +Cc: tglx, netdev, linux-kernel
From: Dejin Zheng <zhengdejin5@gmail.com>
Date: Sat, 25 Apr 2020 19:56:12 +0800
> the label of err_register is not necessary, so delete it to
> simplify code.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
It's not unnecessary, it's documenting the state of the probe.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v1] ethernet: ks8842: delete unnecessary goto label
2020-04-27 18:15 ` David Miller
@ 2020-04-28 2:58 ` Dejin Zheng
0 siblings, 0 replies; 3+ messages in thread
From: Dejin Zheng @ 2020-04-28 2:58 UTC (permalink / raw)
To: David Miller; +Cc: tglx, netdev, linux-kernel
On Mon, Apr 27, 2020 at 11:15:47AM -0700, David Miller wrote:
> From: Dejin Zheng <zhengdejin5@gmail.com>
> Date: Sat, 25 Apr 2020 19:56:12 +0800
>
> > the label of err_register is not necessary, so delete it to
> > simplify code.
> >
> > Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
>
> It's not unnecessary, it's documenting the state of the probe.
David, Thanks for your information, and abandon this commit.
BR,
Dejin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-28 2:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 11:56 [PATCH net-next v1] ethernet: ks8842: delete unnecessary goto label Dejin Zheng
2020-04-27 18:15 ` David Miller
2020-04-28 2:58 ` Dejin Zheng
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).