From patchwork Wed Dec 12 00:24:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Roelandt X-Patchwork-Id: 1866781 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork2.kernel.org (Postfix) with ESMTP id 73C95DF2EE for ; Wed, 12 Dec 2012 14:06:12 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id qBCE24Mk019615; Wed, 12 Dec 2012 08:02:04 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBCE23So009739; Wed, 12 Dec 2012 08:02:03 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Wed, 12 Dec 2012 08:02:03 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBCE23J0017667; Wed, 12 Dec 2012 08:02:03 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4880F80627; Wed, 12 Dec 2012 08:02:03 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 9F71A80626 for ; Tue, 11 Dec 2012 18:32:57 -0600 (CST) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBC0Wv6G028752 for ; Tue, 11 Dec 2012 18:32:57 -0600 (CST) Received: from psmtp.com (na3sys009amx223.postini.com [74.125.149.63]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id qBC0WtMx012867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 11 Dec 2012 18:32:56 -0600 Received: from mail-we0-f173.google.com ([74.125.82.173]) (using TLSv1) by na3sys009amx223.postini.com ([74.125.148.10]) with SMTP; Tue, 11 Dec 2012 19:32:56 EST Received: by mail-we0-f173.google.com with SMTP id z2so29370wey.4 for ; Tue, 11 Dec 2012 16:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=ACBPxpE/Tya/08ZiLlI1aw0t18yDSDCiZEUu9NR8m5w=; b=zjlqMEegzWOeD0c35b34X1iQHHlIrFX/0Id0I/neu+EYBqqpBNB3aWOt3iNEqvo9X9 culBwGHdgWhQR5DDmGmlEwPiZ/kz3Gi7+pXktEAdqmYSwxWHkD5FfBctqy00rMSJreOQ SaGq78e0UW4xETlZS5rN1wMpiEawi0mLUtd024lxhYJEQa5GZENWr7kPocuT9oeDyI2c MIIja8SGQKlgi0Btfji8znu6t3PQED2TNdPAduobulvoetsS3BL+xn75W7bb7w3g0LYt zRy6cBX8pzLvP4XH7PAHh6hf4WiWa9Qum1lFRX4iI6CMSPuqp+xOJ+PaLkHKr4CVbViQ 2Tgg== Received: by 10.180.24.199 with SMTP id w7mr11805325wif.5.1355272374374; Tue, 11 Dec 2012 16:32:54 -0800 (PST) Received: from localhost.localdomain (tal33-3-82-233-82-24.fbx.proxad.net. [82.233.82.24]) by mx.google.com with ESMTPS id h19sm993874wiv.7.2012.12.11.16.32.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Dec 2012 16:32:53 -0800 (PST) From: Cyril Roelandt To: Subject: [PATCH 2/5] media: davinci: fix return value check in vpbe_display_reqbufs(). Date: Wed, 12 Dec 2012 01:24:51 +0100 Message-ID: <1355271894-5284-3-git-send-email-tipecaml@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355271894-5284-1-git-send-email-tipecaml@gmail.com> References: <1355271894-5284-1-git-send-email-tipecaml@gmail.com> X-pstn-levels: (S:47.75945/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:no-policies X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] X-Mailman-Approved-At: Wed, 12 Dec 2012 08:02:01 -0600 CC: , , Cyril Roelandt , , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com vb2_dma_contig_init_ctx() returns ERR_PTR and never returns NULL, so IS_ERR should be used instead of a NULL check. Signed-off-by: Cyril Roelandt --- drivers/media/platform/davinci/vpbe_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 2bfde79..2db4eff 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -1393,7 +1393,7 @@ static int vpbe_display_reqbufs(struct file *file, void *priv, } /* Initialize videobuf queue as per the buffer type */ layer->alloc_ctx = vb2_dma_contig_init_ctx(vpbe_dev->pdev); - if (!layer->alloc_ctx) { + if (IS_ERR(layer->alloc_ctx)) { v4l2_err(&vpbe_dev->v4l2_dev, "Failed to get the context\n"); return -EINVAL; }