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: 4721801 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2DEC99F319 for ; Thu, 14 Aug 2014 02:22:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BA2E2018B for ; Thu, 14 Aug 2014 02:22:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2FE87201D3 for ; Thu, 14 Aug 2014 02:22:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C2A289247; Wed, 13 Aug 2014 19:22:44 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id A142389247 for ; Wed, 13 Aug 2014 19:22:42 -0700 (PDT) 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 dri-devel@lists.freedesktop.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 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 g8FrxLzS45zyl81dfPPJQvPIzTenst2RapiVMnN74ZOur5ba76VuTp3kZ1NrGrb8v9H7qGva N89rngyeeej5a80yZ5X7D2Pu+WRfis/e/chOfvOUo1FbHGQOznl84NXyDFaXoF+HirZf8/kq aLNzvbLf2iq+TtPlSizFGYmGWsxFxYkA4oygwngCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRmVeSWpSXmKPExsVy+t9jAd0C2TfBBnemSFvcWneO1aL33Ekm iytf37NZTLo/gcXixb2LLBa9C66yWZxtesNuMeP8PiaLGZNfsjlwemz/9oDV4373cSaPvi2r GD0+b5ILYIlqYLTJSE1MSS1SSM1Lzk/JzEu3VfIOjneONzUzMNQ1tLQwV1LIS8xNtVVy8QnQ dcvMATpGSaEsMacUKBSQWFyspG+HaUJoiJuuBUxjhK5vSBBcj5EBGkhYx5jR3v2FpeA/Z8Xc 6dcZGxincnQxcnJICJhIrNm/nB3CFpO4cG89WxcjF4eQwCJGiRefJjFDOK1MEls3fGEEqWIT 0JR4/nEHK4gtImAq0TFpKQtIEbPAdkaJdycawEYJC/hKnDvVywZiswioSiyfehIszivgIvFm xwMmiHVyElN+L2CfwMi9gJFhFaNoakFyQXFSeq6RXnFibnFpXrpecn7uJkZwjDyT3sG4qsHi EKMAB6MSD69H1OtgIdbEsuLK3EOMEhzMSiK8ysxvgoV4UxIrq1KL8uOLSnNSiw8xmgJtn8gs JZqcD4zfvJJ4Q2MTMyNLIzNjE3NjYyVx3oOt1oFCAumJJanZqakFqUUwfUwcnFINjGsiWov+ 8HLqH0nU2l9RlSVZxMM0VWP1Lr0PHrNEFv+9qR0lHFR3zZ7Hr/PWs67r9xffXZb79rRVPkeG 9EefhU2PZ01asjJpZUnEpK98QU93/vMxqrV5WLHb9YDCTfe3Mj3bqiI8g4J40mLVDW7/rwi+ kXpfuWXXKYEvQaf4Tx3pEar5Wlq/UImlOCPRUIu5qDgRANoIt0CnAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: linux-samsung-soc@vger.kernel.org, sw0312.kim@samsung.com, a.hajda@samsung.com, kyungmin.park@samsung.com, kgene.kim@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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);