From patchwork Mon Feb 15 14:35:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 8315921 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 09801C02AA for ; Mon, 15 Feb 2016 14:39:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AB64203C3 for ; Mon, 15 Feb 2016 14:39:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ECE94203B8 for ; Mon, 15 Feb 2016 14:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753446AbcBOOiS (ORCPT ); Mon, 15 Feb 2016 09:38:18 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:23918 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753382AbcBOOgp (ORCPT ); Mon, 15 Feb 2016 09:36:45 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O2L007FZF966B40@mailout3.w1.samsung.com>; Mon, 15 Feb 2016 14:36:42 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-c7-56c1e27a717e Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 26.7D.21385.A72E1C65; Mon, 15 Feb 2016 14:36:42 +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:42 +0000 (GMT) From: Andrzej Hajda To: linux-kernel@vger.kernel.org Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Ludovic Desroches , Guennadi Liakhovetski , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 4/7] atmel-isi: fix IS_ERR_VALUE usage Date: Mon, 15 Feb 2016 15:35:22 +0100 Message-id: <1455546925-22119-5-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+NgFprKLMWRmVeSWpSXmKPExsVy+t/xq7pVjw6GGXQd1bS4te4cq8XGGetZ Ld5vnMdkcXnXHDaLng1bWS0OzUy2WHvkLrvF6mcVDhweC35tZfH48DHOY0v/XXaPvi2rGD0+ b5ILYI3isklJzcksSy3St0vgyjizYwJzwT7Oip7eyywNjD/Yuxg5OSQETCQaZ5yEssUkLtxb z9bFyMUhJLCUUeLRg6usEE4Tk8TL1iY2kCo2AU2Jv5tvgtkiAgoSm3ufsYLYzAKHmCQmzTIH sYUFzCQOvP4EFmcRUJX42baYCcTmFXCWOLmwjwVim5zEyWOTgWo4ODgFXCQW7C0ACQsBlezf vY1pAiPvAkaGVYyiqaXJBcVJ6blGesWJucWleel6yfm5mxghgfV1B+PSY1aHGAU4GJV4eCPO HAgTYk0sK67MPcQowcGsJMJrcfpgmBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHembvehwgJpCeW pGanphakFsFkmTg4pRoYt1Q9N9n6mVl4VXtjoUb3pui2Tew7JhpmvTxzfBmP6un5nxdp2sVt 3LMyWUx/S8yTWIYqv1NeBtMbdGfu94z/dn3FxyUTD8XsUVgnMvv5/vsPX5yyYzu05Ou1ZdZm 5bxvlZ4ynDZ/5Cqgol7bWXV9eqB7Uo5y1KOF7g9bl2+I9kxYcvjrrfaFD5VYijMSDbWYi4oT AXi00KMoAgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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/media/platform/soc_camera/atmel-isi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index 1af779e..ab2d9b9 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c @@ -1026,7 +1026,7 @@ static int atmel_isi_parse_dt(struct atmel_isi *isi, static int atmel_isi_probe(struct platform_device *pdev) { - unsigned int irq; + int irq; struct atmel_isi *isi; struct resource *regs; int ret, i; @@ -1086,7 +1086,7 @@ static int atmel_isi_probe(struct platform_device *pdev) isi->width_flags |= 1 << 9; irq = platform_get_irq(pdev, 0); - if (IS_ERR_VALUE(irq)) { + if (irq < 0) { ret = irq; goto err_req_irq; }