From patchwork Wed Dec 16 16:10:05 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: 68392 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 nBI4ixox005715 for ; Fri, 18 Dec 2009 04:46:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934960AbZLPQKq (ORCPT ); Wed, 16 Dec 2009 11:10:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934955AbZLPQKo (ORCPT ); Wed, 16 Dec 2009 11:10:44 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:41246 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934884AbZLPQKk (ORCPT ); Wed, 16 Dec 2009 11:10:40 -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-0002Jj-7T; 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-0006Su-Lt; 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 , Magnus Damm , Kuninori Morimoto , Paul Mundt , linux-media@vger.kernel.org Subject: [PATCH 3/7] V4L/DVB sh_mobile_ceu: don't check platform_get_irq's return value against zero Date: Wed, 16 Dec 2009 17:10:05 +0100 Message-Id: <1260979809-24811-3-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1260979809-24811-2-git-send-email-u.kleine-koenig@pengutronix.de> References: <1260979809-24811-1-git-send-email-u.kleine-koenig@pengutronix.de> <1260979809-24811-2-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/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 961e448..f18e674 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -1709,7 +1709,7 @@ static int __devinit sh_mobile_ceu_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) { dev_err(&pdev->dev, "Not enough CEU platform resources.\n"); err = -ENODEV; goto exit;