linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: WEN Pingbo <pingbo.wen@linaro.org>
To: dmitry.torokhov@gmail.com
Cc: broonie@kernel.org, linux-input@vger.kernel.org,
	WEN Pingbo <pingbo.wen@linaro.org>
Subject: [PATCH 2/2] Input: lpc32xx: handle clk_enable return value
Date: Fri, 11 Sep 2015 11:02:56 +0800	[thread overview]
Message-ID: <1441940576-4972-2-git-send-email-pingbo.wen@linaro.org> (raw)
In-Reply-To: <1441940576-4972-1-git-send-email-pingbo.wen@linaro.org>

If clk_enable failed, return the err code

Signed-off-by: WEN Pingbo <pingbo.wen@linaro.org>
---
 drivers/input/touchscreen/lpc32xx_ts.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c
index 24d704c..60cd31d 100644
--- a/drivers/input/touchscreen/lpc32xx_ts.c
+++ b/drivers/input/touchscreen/lpc32xx_ts.c
@@ -145,8 +145,14 @@ static void lpc32xx_stop_tsc(struct lpc32xx_tsc *tsc)
 static void lpc32xx_setup_tsc(struct lpc32xx_tsc *tsc)
 {
 	u32 tmp;
+	int retval;
 
-	clk_enable(tsc->clk);
+	retval = clk_enable(tsc->clk);
+	if (retval) {
+		dev_err(&tsc->dev->dev,
+			"clk_enable failed, ret %d\n", retval);
+		return;
+	}
 
 	tmp = tsc_readl(tsc, LPC32XX_TSC_CON) & ~LPC32XX_TSC_ADCCON_POWER_UP;
 
-- 
1.9.1


  reply	other threads:[~2015-09-11  3:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  3:02 [PATCH 1/2] Input: at32psif: handle clk_enable return value WEN Pingbo
2015-09-11  3:02 ` WEN Pingbo [this message]
2015-09-11  3:10 ` Fabio Estevam
2015-09-11  3:21   ` Pingbo Wen
2015-09-11  3:34   ` [PATCH V2 " WEN Pingbo

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=1441940576-4972-2-git-send-email-pingbo.wen@linaro.org \
    --to=pingbo.wen@linaro.org \
    --cc=broonie@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).