Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbdFAHPT (ORCPT ); Thu, 1 Jun 2017 03:15:19 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35926 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbdFAHPS (ORCPT ); Thu, 1 Jun 2017 03:15:18 -0400 From: Arvind Yadav 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 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 617 Lines: 24 clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- 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