From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: lee.jones@linaro.org, linus.walleij@linaro.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] mfd: tc6393xb: Handle return value of clk_prepare_enable
Date: Thu, 1 Jun 2017 12:44:50 +0530 [thread overview]
Message-ID: <f7574163bae6d67e932fd73306a3f53700bdf2d8.1496297744.git.arvind.yadav.cs@gmail.com> (raw)
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/mfd/tc6393xb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index d16e71b..0c9f039 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -797,7 +797,9 @@ static int tc6393xb_resume(struct platform_device *dev)
int ret;
int i;
- clk_prepare_enable(tc6393xb->clk);
+ ret = clk_prepare_enable(tc6393xb->clk);
+ if (ret)
+ return ret;
ret = tcpd->resume(dev);
if (ret)
--
1.9.1
next reply other threads:[~2017-06-01 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 7:14 Arvind Yadav [this message]
2017-06-05 8:13 ` 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=f7574163bae6d67e932fd73306a3f53700bdf2d8.1496297744.git.arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.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®