From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: davinci: vpbe: missing clk_put
Date: Thu, 6 Nov 2014 18:34:27 +0530 [thread overview]
Message-ID: <1415279067-653-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
we are getting struct clk using clk_get before calling
clk_prepare_enable. but if clk_prepare_enable fails, then we are
jumping to fail_mutex_unlock where we are just unlocking the mutex,
but we are not freeing the clock source.
this patch just adds a call to clk_put before jumping to
fail_mutex_unlock.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/media/platform/davinci/vpbe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 49d2de0..e5df991 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -625,6 +625,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
}
if (clk_prepare_enable(vpbe_dev->dac_clk)) {
ret = -ENODEV;
+ clk_put(vpbe_dev->dac_clk);
goto fail_mutex_unlock;
}
}
--
1.8.1.2
next reply other threads:[~2014-11-06 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 13:04 Sudip Mukherjee [this message]
2014-11-07 12:08 ` Prabhakar Lad
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=1415279067-653-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=prabhakar.csengg@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
all inboxes | Powered by JetHome®