From patchwork Thu Aug 14 02:22:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 4721921 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DCD83C0338 for ; Thu, 14 Aug 2014 02:25:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 22FA5201CD for ; Thu, 14 Aug 2014 02:25:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEF082012F for ; Thu, 14 Aug 2014 02:25:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754340AbaHNCZn (ORCPT ); Wed, 13 Aug 2014 22:25:43 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:9792 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754263AbaHNCWm (ORCPT ); Wed, 13 Aug 2014 22:22:42 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NA9009VKYLSWO10@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Thu, 14 Aug 2014 11:22:40 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.43]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 19.F1.25328.07D1CE35; Thu, 14 Aug 2014 11:22:40 +0900 (KST) X-AuditID: cbfee68d-b7f2f6d0000062f0-94-53ec1d701ea8 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 06.1C.05196.07D1CE35; Thu, 14 Aug 2014 11:22:40 +0900 (KST) Received: from localhost.localdomain ([10.252.75.90]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NA90020XYLO5060@mmp1.samsung.com>; Thu, 14 Aug 2014 11:22:40 +0900 (KST) From: YoungJun Cho To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, kyungmin.park@samsung.com, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com, kgene.kim@samsung.com Subject: [PATCH] drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value Date: Thu, 14 Aug 2014 11:22:36 +0900 Message-id: <1407982956-18923-1-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.9.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRmVeSWpSXmKPExsVy+t8zbd0C2TfBBrvvyVncWneO1aL33Ekm iytf37NZTLo/gcXixb2LLBa9C66yWZxtesNuMeP8PiaLGZNfsjlwemz/9oDV4373cSaPvi2r GD0+b5ILYInisklJzcksSy3St0vgymjv/sJS8J+zYu7064wNjFM5uhg5OSQETCQ+vprIBmGL SVy4tx7I5uIQEljGKNH0+SUrTNGa/cvZIRKLGCVefJrEDOG0Mkls3fCFEaSKTUBT4vnHHWAd IgKmEh2TlrKAFDELbGeUeHeigR0kISzgK3HuVC/YPhYBVYnlU0+CxXkFXCTe7HjABLFOTmLK 7wVg6yQE2tkluhteM0I0CEh8m3wIaCoHUEJWYtMBZoh6SYmDK26wTGAUXMDIsIpRNLUguaA4 Kb3IUK84Mbe4NC9dLzk/dxMjJIh7dzDePmB9iDEZaNxEZinR5HxgFOSVxBsamxlZmJqYGhuZ W5qRJqwkzpv0MClISCA9sSQ1OzW1ILUovqg0J7X4ECMTB6dUA6P71Zdru067ZEkEH3zyfdKN g8Fr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-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The type of this function is unsigned long, and it is expected to return proper fout value or zero if something is wrong. So this patch fixes wrong return value for error cases. Signed-off-by: YoungJun Cho Acked-by: Inki Dae Acked-by: Kyungmin Park Acked-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 86aebd8..061017b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -421,7 +421,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi, if (!fout) { dev_err(dsi->dev, "failed to find PLL PMS for requested frequency\n"); - return -EFAULT; + return 0; } dev_dbg(dsi->dev, "PLL freq %lu, (p %d, m %d, s %d)\n", fout, p, m, s); @@ -453,7 +453,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi, do { if (timeout-- == 0) { dev_err(dsi->dev, "PLL failed to stabilize\n"); - return -EFAULT; + return 0; } reg = readl(dsi->reg_base + DSIM_STATUS_REG); } while ((reg & DSIM_PLL_STABLE) == 0);