[PATCH 2/2] Input: lpc32xx: handle clk_enable return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If clk_enable failed, return the err code

Signed-off-by: WEN Pingbo <pingbo.wen@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux