From: Jingoo Han <jg1.han@samsung.com>
To: "'Lee Jones'" <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org,
"'Samuel Ortiz'" <sameo@linux.intel.com>,
"'Jingoo Han'" <jg1.han@samsung.com>
Subject: [PATCH V2] mfd: timberdale: remove unnecessary pci_set_drvdata()
Date: Fri, 13 Sep 2013 11:23:57 +0900 [thread overview]
Message-ID: <000401ceb028$4cb42d60$e61c8820$%han@samsung.com> (raw)
In-Reply-To: <001701ceaf83$8921e6c0$9b65b440$%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. It also removes unnecessary label such
as 'err_request'.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- Removed unnecessary label such as 'err_request'.
drivers/mfd/timberdale.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index a6755ec..dbb34f9 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -678,7 +678,7 @@ static int timb_probe(struct pci_dev *dev,
priv->ctl_mapbase = mapbase + CHIPCTLOFFSET;
if (!request_mem_region(priv->ctl_mapbase, CHIPCTLSIZE, "timb-ctl")) {
dev_err(&dev->dev, "Failed to request ctl mem\n");
- goto err_request;
+ goto err_start;
}
priv->ctl_membase = ioremap(priv->ctl_mapbase, CHIPCTLSIZE);
@@ -828,13 +828,10 @@ err_config:
iounmap(priv->ctl_membase);
err_ioremap:
release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE);
-err_request:
- pci_set_drvdata(dev, NULL);
err_start:
pci_disable_device(dev);
err_enable:
kfree(priv);
- pci_set_drvdata(dev, NULL);
return -ENODEV;
}
@@ -851,7 +848,6 @@ static void timb_remove(struct pci_dev *dev)
pci_disable_msix(dev);
pci_disable_device(dev);
- pci_set_drvdata(dev, NULL);
kfree(priv);
}
--
1.7.10.4
next prev parent reply other threads:[~2013-09-13 2:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 6:41 [PATCH 1/3] mfd: lpc_ich: " Jingoo Han
2013-09-12 6:43 ` [PATCH 2/3] mfd: sm501: " Jingoo Han
2013-09-12 15:11 ` Lee Jones
2013-09-12 6:44 ` [PATCH 3/3] mfd: timberdale: " Jingoo Han
2013-09-12 15:10 ` Lee Jones
2013-09-13 2:23 ` Jingoo Han [this message]
2013-09-13 7:07 ` [PATCH V2] " Lee Jones
2013-09-12 15:09 ` [PATCH 1/3] mfd: lpc_ich: " Lee Jones
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='000401ceb028$4cb42d60$e61c8820$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®