From: Jingoo Han <jg1.han@samsung.com>
To: "'David S. Miller'" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, 'Jingoo Han' <jg1.han@samsung.com>
Subject: [PATCH 4/7] net: phy: spi_ks8995: remove unnecessary spi_set_drvdata()
Date: Tue, 10 Dec 2013 12:50:42 +0900 [thread overview]
Message-ID: <000e01cef55a$ffca41b0$ff5ec510$%han@samsung.com> (raw)
In-Reply-To: <000601cef55a$b605fab0$2211f010$%han@samsung.com>
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>
---
drivers/net/phy/spi_ks8995.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
index f3bea13..98fb9f3 100644
--- a/drivers/net/phy/spi_ks8995.c
+++ b/drivers/net/phy/spi_ks8995.c
@@ -325,7 +325,6 @@ static int ks8995_probe(struct spi_device *spi)
return 0;
err_drvdata:
- spi_set_drvdata(spi, NULL);
kfree(ks);
return err;
}
@@ -337,7 +336,6 @@ static int ks8995_remove(struct spi_device *spi)
ks8995 = spi_get_drvdata(spi);
sysfs_remove_bin_file(&spi->dev.kobj, &ks8995_registers_attr);
- spi_set_drvdata(spi, NULL);
kfree(ks8995);
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2013-12-10 3:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 3:48 [PATCH 1/7] net: hippi: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-10 3:49 ` [PATCH 2/7] net: fddi: " Jingoo Han
2013-12-10 3:50 ` [PATCH 3/7] net: vmxnet3: " Jingoo Han
2013-12-10 4:37 ` Shreyas Bhatewara
2013-12-10 4:53 ` Jingoo Han
2013-12-10 3:50 ` Jingoo Han [this message]
2013-12-10 3:51 ` [PATCH 5/7] net: ieee802154: remove unnecessary spi_set_drvdata() Jingoo Han
2013-12-10 3:51 ` [PATCH 6/7] atm: he: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-10 3:52 ` [PATCH 7/7] atm: solos-pci: " Jingoo Han
2013-12-11 3:32 ` [PATCH 1/7] net: hippi: " David Miller
2013-12-11 3:35 ` Jingoo Han
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='000e01cef55a$ffca41b0$ff5ec510$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.