Skip to content

Commit

Permalink
net: ieee802154: remove unnecessary spi_set_drvdata()
Browse files Browse the repository at this point in the history
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jingoo Han authored and David S. Miller committed Dec 11, 2013
1 parent 6d4bebe commit 40706af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,6 @@ static int at86rf230_probe(struct spi_device *spi)
err_slp_tr:
gpio_free(lp->rstn);
err_rstn:
spi_set_drvdata(spi, NULL);
mutex_destroy(&lp->bmux);
ieee802154_free_device(lp->dev);
return rc;
Expand All @@ -1006,7 +1005,6 @@ static int at86rf230_remove(struct spi_device *spi)
gpio_free(lp->slp_tr);
gpio_free(lp->rstn);

spi_set_drvdata(spi, NULL);
mutex_destroy(&lp->bmux);
ieee802154_free_device(lp->dev);

Expand Down
1 change: 0 additions & 1 deletion drivers/net/ieee802154/mrf24j40.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ static int mrf24j40_remove(struct spi_device *spi)
* complete? */

/* Clean up the SPI stuff. */
spi_set_drvdata(spi, NULL);
kfree(devrec->buf);
kfree(devrec);
return 0;
Expand Down

0 comments on commit 40706af

Please sign in to comment.