From patchwork Mon Feb 15 14:35:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 8315851 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 32A509F399 for ; Mon, 15 Feb 2016 14:38:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47BE5203DF for ; Mon, 15 Feb 2016 14:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A67B203C0 for ; Mon, 15 Feb 2016 14:38:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753369AbcBOOiS (ORCPT ); Mon, 15 Feb 2016 09:38:18 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:32635 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbcBOOgp (ORCPT ); Mon, 15 Feb 2016 09:36:45 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O2L007B1F970C40@mailout2.w1.samsung.com>; Mon, 15 Feb 2016 14:36:43 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-c8-56c1e27b2bd8 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id B6.7D.21385.B72E1C65; Mon, 15 Feb 2016 14:36:43 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O2L005QPF94GF00@eusync3.samsung.com>; Mon, 15 Feb 2016 14:36:43 +0000 (GMT) From: Andrzej Hajda To: linux-kernel@vger.kernel.org Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Inki Dae , Donghwa Lee , Kyungmin Park , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 6/7] fbdev: exynos: fix IS_ERR_VALUE usage Date: Mon, 15 Feb 2016 15:35:24 +0100 Message-id: <1455546925-22119-7-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1455546925-22119-1-git-send-email-a.hajda@samsung.com> References: <1455546925-22119-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrILMWRmVeSWpSXmKPExsVy+t/xq7rVjw6GGSztNLC4te4cq8XGGetZ La6ft7OYdH8Ci8XZpjfsFif6PrBaXN41h81ixvl9TBZrj9xlt1j38AWTxfr5t9gcuD1eXbjD 4tG3ZRWjx/Eb25k8Pm+SC2CJ4rJJSc3JLEst0rdL4Mp4suISa8FEzooJC0+xNDDeZe9i5OSQ EDCR2DHzLwuELSZx4d56ti5GLg4hgaWMElf3nGKEcJqYJNZN+8YEUsUmoCnxd/NNNhBbREBB YnPvM1YQm1lgBbNE33YvEFtYwEri8J2fYFNZBFQlHl5ZAmbzCjhLTJ13FmqznMTJY5OBejk4 OAVcJBbsLQAJCwGV7N+9jWkCI+8CRoZVjKKppckFxUnpuUZ6xYm5xaV56XrJ+bmbGCEB93UH 49JjVocYBTgYlXh4I84cCBNiTSwrrsw9xCjBwawkwmtx+mCYEG9KYmVValF+fFFpTmrxIUZp DhYlcd6Zu96HCAmkJ5akZqemFqQWwWSZODilGhgNf1S8TvnpMO14DIe51b0yz6RejYCrzv5+ 4dxrrbfJZZq+fr1GYYeb7auzJQ/2OUiyTy41TeJo6uTzq+COrz+zV2B7hlH1MU/HaWbGN/0D 9hxmUOdO2vGyMeB/UWsJ941TCQ8NZ+1xuXJKsLPDPoUt1DM+w+DCwi0HTdy6XzMlW5nd8dAN V2Ipzkg01GIuKk4EAPrLtmQ0AgAA Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 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 IS_ERR_VALUE macro should be used only with unsigned long type. For signed types comparison 'ret < 0' should be used. The patch follows conclusion from discussion on LKML [1][2]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2120927 [2]: http://permalink.gmane.org/gmane.linux.kernel/2150581 Signed-off-by: Andrzej Hajda --- drivers/video/fbdev/exynos/exynos_mipi_dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi.c b/drivers/video/fbdev/exynos/exynos_mipi_dsi.c index b527fe4..951b592 100644 --- a/drivers/video/fbdev/exynos/exynos_mipi_dsi.c +++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi.c @@ -402,12 +402,12 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) goto error; } - dsim->irq = platform_get_irq(pdev, 0); - if (IS_ERR_VALUE(dsim->irq)) { + ret = platform_get_irq(pdev, 0); + if (ret < 0) { dev_err(&pdev->dev, "failed to request dsim irq resource\n"); - ret = -EINVAL; goto error; } + dsim->irq = ret; init_completion(&dsim_wr_comp); init_completion(&dsim_rd_comp);