Patchwork [1/2] at86rf230: remove unnecessary / dead code

login
register
mail settings
Submitter Sascha Herrmann
Date April 4, 2013, 9:02 p.m.
Message ID <c9c5bee7116dd5847ed9e2ebb8be49fcde0cc052.1365107512.git.sascha@ps.nvbi.de>
Download mbox | patch
Permalink /patch/233946/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sascha Herrmann - April 4, 2013, 9:02 p.m.
In at86rf230_probe() lp was first set to dev->priv and a few lines later
dev->priv was set to lp again, without changing lp in between. The call
to ieee802154_unregister_device() before err_irq: was unreachable.

Signed-off-by: Sascha Herrmann <sascha@ps.nvbi.de>
---
 drivers/net/ieee802154/at86rf230.c |    2 --
 1 file changed, 2 deletions(-)
David Miller - April 8, 2013, 4:01 p.m.
From: Sascha Herrmann <sascha@ps.nvbi.de>
Date: Thu,  4 Apr 2013 23:02:00 +0200

> In at86rf230_probe() lp was first set to dev->priv and a few lines later
> dev->priv was set to lp again, without changing lp in between. The call
> to ieee802154_unregister_device() before err_irq: was unreachable.
> 
> Signed-off-by: Sascha Herrmann <sascha@ps.nvbi.de>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 6e88eab..fc315dd 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -838,7 +838,6 @@  static int at86rf230_probe(struct spi_device *spi)
 
 	lp->spi = spi;
 
-	dev->priv = lp;
 	dev->parent = &spi->dev;
 	dev->extra_tx_headroom = 0;
 	/* We do support only 2.4 Ghz */
@@ -940,7 +939,6 @@  static int at86rf230_probe(struct spi_device *spi)
 
 	return rc;
 
-	ieee802154_unregister_device(lp->dev);
 err_irq:
 	free_irq(spi->irq, lp);
 	flush_work(&lp->irqwork);