From patchwork Wed Jun 7 09:52:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9771167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E5096034B for ; Wed, 7 Jun 2017 09:55:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E5A2284C5 for ; Wed, 7 Jun 2017 09:55:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12E84284D4; Wed, 7 Jun 2017 09:55:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD833284C5 for ; Wed, 7 Jun 2017 09:55:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbdFGJww (ORCPT ); Wed, 7 Jun 2017 05:52:52 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34254 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406AbdFGJw2 (ORCPT ); Wed, 7 Jun 2017 05:52:28 -0400 Received: by mail-pg0-f67.google.com with SMTP id v14so1036190pgn.1; Wed, 07 Jun 2017 02:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3o4okFejwwambKs4Y4t4tU+nSO/Mz5Su5eINGZ+UTp8=; b=VpuDQztoVmFE2QpLdLlFEhYKBRdZmNkfGUPBE0bjBFpKFbF0BC/xaqV1JUuwYzK7pO q4cS5PMY4IrE+0HSK4W0Y6tycRcUF/HKw2mA3XZ7d8WVT7CgtXpQfhdbzi+qdyy2VrUh zukek2ECuLCSmywrN7u0MjV7KeFPcGYaHPIVRTZNOjv20JfPHkelGDHZZYNlghMUlxD6 rVg7Erd6wgXLpU/7J4wzGw/tgn3knasBgTK2hkz//vTcbmKR3uvqtTieG/ZYZ9OtUd1x Fs6RYnXuU6jTD7eMUvK5CxSal0BPIlGFUT25rFYyFPEPw97EKZmVkawjCXrDVrObq/05 Rs1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3o4okFejwwambKs4Y4t4tU+nSO/Mz5Su5eINGZ+UTp8=; b=s4NPH7PcFf+lLTq4rz1KgD/MfDmZDMv3hmaffZEEZHLprPW2VQBM8QgFWgNc4d5Xbc 3dIafhcph5lrToAGqi3J+T7LPUkmsPyBoZOG31h/gGvzHYpdRxiISB9uO0L8DA2EuZ6H 4nHhhXSm7tFJPWAMxAz/mngAbT+QHAG0jbAkyCFhniHKYsdeEkBV7/8rOd3PXGCPXY1A yYI4m9nWHRwDKrzcyd8tU5UfxHA1Owoa+Ux56mKen6aJ3TEHdymNWK6Mve0oc1dg+egD 1ZvV/hE3j88kN3nTJyh/aVGSCJIRnTjYHnzHbE1cG9+tOfP8hOaKFUwcV7tfpJiu2Ufy FkJQ== X-Gm-Message-State: AODbwcCrq+U2oQVg9HbpcHdI2wXk3ZAI78vmIQsrMkNKZubniIUFsOtJ IjXEsmEeffjViA== X-Received: by 10.84.210.44 with SMTP id z41mr23840430plh.143.1496829147483; Wed, 07 Jun 2017 02:52:27 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id j6sm3929406pgc.1.2017.06.07.02.52.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jun 2017 02:52:27 -0700 (PDT) From: Arvind Yadav To: b.zolnierkie@samsung.com Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: pxafb: Handle return value of clk_prepare_enable Date: Wed, 7 Jun 2017 15:22:09 +0530 Message-Id: <5e0ce70b74924acc351ce4d8ef846c28f8e6ceda.1496829008.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/video/fbdev/pxafb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index b21a89b..c3d49e1 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -1436,7 +1436,10 @@ static void pxafb_enable_controller(struct pxafb_info *fbi) pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3); /* enable LCD controller clock */ - clk_prepare_enable(fbi->clk); + if (clk_prepare_enable(fbi->clk)) { + pr_err("%s: Failed to prepare clock\n", __func__); + return; + } if (fbi->lccr0 & LCCR0_LCDT) return;