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