From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Cc: James Morris <jmorris@namei.org>,
baryluk@smp.if.uj.edu.pl,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] tpm_nsc: Fix bugzilla 34572
Date: Fri, 22 Jul 2011 17:39:20 -0400 [thread overview]
Message-ID: <1311370760.565.4.camel@d941e-10> (raw)
This patch fixes kernel bugzilla 34572. It applies to the tip of Linus's tree.
https://bugzilla.kernel.org/show_bug.cgi?id=34572
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Tested-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
---
drivers/char/tpm/tpm_nsc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: linux-2.6/drivers/char/tpm/tpm_nsc.c
===================================================================
--- linux-2.6.orig/drivers/char/tpm/tpm_nsc.c
+++ linux-2.6/drivers/char/tpm/tpm_nsc.c
@@ -330,12 +330,12 @@ static int __init init_nsc(void)
pdev->dev.driver = &nsc_drv.driver;
pdev->dev.release = tpm_nsc_remove;
- if ((rc = platform_device_register(pdev)) < 0)
- goto err_free_dev;
+ if ((rc = platform_device_add(pdev)) < 0)
+ goto err_put_dev;
if (request_region(base, 2, "tpm_nsc0") == NULL ) {
rc = -EBUSY;
- goto err_unreg_dev;
+ goto err_del_dev;
}
if (!(chip = tpm_register_hardware(&pdev->dev, &tpm_nsc))) {
@@ -382,10 +382,10 @@ static int __init init_nsc(void)
err_rel_reg:
release_region(base, 2);
-err_unreg_dev:
- platform_device_unregister(pdev);
-err_free_dev:
- kfree(pdev);
+err_del_dev:
+ platform_device_del(pdev);
+err_put_dev:
+ platform_device_put(pdev);
err_unreg_drv:
platform_driver_unregister(&nsc_drv);
return rc;
next reply other threads:[~2011-07-22 21:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 21:39 Stefan Berger [this message]
2011-07-25 0:41 ` James Morris
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=1311370760.565.4.camel@d941e-10 \
--to=stefanb@linux.vnet.ibm.com \
--cc=baryluk@smp.if.uj.edu.pl \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srajiv@linux.vnet.ibm.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®