Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbdFEIOB (ORCPT ); Mon, 5 Jun 2017 04:14:01 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:34288 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbdFEIN7 (ORCPT ); Mon, 5 Jun 2017 04:13:59 -0400 Date: Mon, 5 Jun 2017 09:13:50 +0100 From: Lee Jones To: Arvind Yadav Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: tc6393xb: Handle return value of clk_prepare_enable Message-ID: <20170605081350.oxmrhjzivarihga4@dell> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 858 Lines: 32 On Thu, 01 Jun 2017, Arvind Yadav wrote: > 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(-) Applied, thanks. > 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) -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog