From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: linux-pm@vger.kernel.org
Cc: myungjoo.ham@gmail.com
Subject: [PATCH] PM / devfreq: remove double put_device
Date: Mon, 16 May 2016 02:47:01 +0000 (GMT) [thread overview]
Message-ID: <531029804.743801463366821536.JavaMail.weblogic@ep2mlwas03c> (raw)
When device_register() returns with error, it has already
done put_device() on the input device pointer.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
drivers/devfreq/devfreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 4f6079e..5200728 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -528,7 +528,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
dev_set_name(&devfreq->dev, "%s", dev_name(dev));
err = device_register(&devfreq->dev);
if (err) {
- put_device(&devfreq->dev);
mutex_unlock(&devfreq->lock);
goto err_out;
}
--
1.9.1
reply other threads:[~2016-05-16 2:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=531029804.743801463366821536.JavaMail.weblogic@ep2mlwas03c \
--to=myungjoo.ham@samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@gmail.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;
as well as URLs for NNTP newsgroup(s).