From: Vasiliy Kulikov <segoon@openwall.com>
To: kernel-janitors@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Daniel Walker <dwalker@codeaurora.org>,
Stepan Moskovchenko <stepanm@codeaurora.org>,
Abhijeet Dharmapurikar <adharmap@codeaurora.org>,
David Brown <davidb@codeaurora.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: msm: tvenc: fix error handling
Date: Fri, 26 Nov 2010 20:06:53 +0300 [thread overview]
Message-ID: <1290791215-21538-1-git-send-email-segoon@openwall.com> (raw)
Driver init() function should return error code.
Also fix tvenc_clk leak.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
Cannot compile this driver, so it is not tested at all.
drivers/staging/msm/tvenc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/msm/tvenc.c b/drivers/staging/msm/tvenc.c
index f41c5ac..4fbb77b 100644
--- a/drivers/staging/msm/tvenc.c
+++ b/drivers/staging/msm/tvenc.c
@@ -279,12 +279,13 @@ static int __init tvenc_driver_init(void)
if (IS_ERR(tvenc_clk)) {
printk(KERN_ERR "error: can't get tvenc_clk!\n");
- return IS_ERR(tvenc_clk);
+ return PTR_ERR(tvenc_clk);
}
if (IS_ERR(tvdac_clk)) {
printk(KERN_ERR "error: can't get tvdac_clk!\n");
- return IS_ERR(tvdac_clk);
+ clk_put(tvenc_clk);
+ return PTR_ERR(tvdac_clk);
}
// pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ , "tvenc",
--
1.7.0.4
reply other threads:[~2010-11-26 17:07 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=1290791215-21538-1-git-send-email-segoon@openwall.com \
--to=segoon@openwall.com \
--cc=adharmap@codeaurora.org \
--cc=davidb@codeaurora.org \
--cc=devel@driverdev.osuosl.org \
--cc=dwalker@codeaurora.org \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stepanm@codeaurora.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 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®