From patchwork Wed Dec 16 16:10:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 68393 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixp0005715 for ; Fri, 18 Dec 2009 04:46:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933472AbZLPQKz (ORCPT ); Wed, 16 Dec 2009 11:10:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934884AbZLPQKq (ORCPT ); Wed, 16 Dec 2009 11:10:46 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:41253 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934952AbZLPQKn (ORCPT ); Wed, 16 Dec 2009 11:10:43 -0500 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.69) (envelope-from ) id 1NKwS7-0002Ji-Fa; Wed, 16 Dec 2009 17:10:15 +0100 Received: from ukl by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1NKwS5-0006Sr-L3; Wed, 16 Dec 2009 17:10:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-kernel@vger.kernel.org Cc: David Vrabel , Greg Kroah-Hartman , Mauro Carvalho Chehab , Guennadi Liakhovetski , Antonio Ospite , Paulius Zaleckas , linux-media@vger.kernel.org Subject: [PATCH 2/7] V4L/DVB mx1_camera: don't check platform_get_irq's return value against zero Date: Wed, 16 Dec 2009 17:10:04 +0100 Message-Id: <1260979809-24811-2-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1260979809-24811-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1260979809-24811-1-git-send-email-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index 7280229..f7a472f 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c @@ -650,7 +650,7 @@ static int __init mx1_camera_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq = platform_get_irq(pdev, 0); - if (!res || !irq) { + if (!res || (int)irq <= 0) { err = -ENODEV; goto exit; }