the label of err_register is not necessary, so delete it to
simplify code.
Signed-off-by: Dejin Zheng <[email protected]>
---
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
From: Dejin Zheng <[email protected]>
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 <[email protected]>
It's not unnecessary, it's documenting the state of the probe.
On Mon, Apr 27, 2020 at 11:15:47AM -0700, David Miller wrote:
> From: Dejin Zheng <[email protected]>
> 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 <[email protected]>
>
> It's not unnecessary, it's documenting the state of the probe.
David, Thanks for your information, and abandon this commit.
BR,
Dejin