From patchwork Fri Jul 20 14:00:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1221211 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork2.kernel.org (Postfix) with ESMTP id BA31BE0038 for ; Fri, 20 Jul 2012 14:03:08 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q6KE1EnM019106; Fri, 20 Jul 2012 09:01:14 -0500 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 q6KE1EUs020875; Fri, 20 Jul 2012 09:01:14 -0500 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; Fri, 20 Jul 2012 09:01:14 -0500 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 q6KE1DRq007284; Fri, 20 Jul 2012 09:01:13 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DF6BC80627; Fri, 20 Jul 2012 09:01:13 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 0256180626 for ; Fri, 20 Jul 2012 09:01:12 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id q6KE1B47005409 for ; Fri, 20 Jul 2012 09:01:11 -0500 (CDT) Received: from psmtp.com (na3sys009amx222.postini.com [74.125.149.62]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id q6KE1A0s019358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 Jul 2012 09:01:10 -0500 Received: from mail-yw0-f45.google.com ([209.85.213.45]) (using TLSv1) by na3sys009amx222.postini.com ([74.125.148.10]) with SMTP; Fri, 20 Jul 2012 07:01:10 PDT Received: by yhpp34 with SMTP id p34so4084134yhp.4 for ; Fri, 20 Jul 2012 07:01:09 -0700 (PDT) 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; bh=sTfXbrYliU8yfiKP5kGc1Gk1bNdWWf1kVQ1OltkI/tQ=; b=traJzewRIFFUY+cUkM9mHCWpBhLIJw71XZbEf8hbisFHGS0o4IoL9ipVR8SCiZdzlw /Y6Fm2IoQStz1zfDkfh8wm+FGgac1OVWA9WwidvOTRXPQq9abLRAy60JjCRlDCgoZNVy oYOR4GjiI35n0HQgYcpd1MoZh/HRkxQG06lrr+3oP1kBQg45oNhpJME6EESbA4bq7D8N e6ZDdS+TepHzganGvs0DgWndfwDl3ugS5608FFeyDwSDbQxFasYh28y8jTQANVm3Bhjb Cs8+dyDFpk1O6QUt+xdH6o28cBsmBlsK5xMKlKCdVIlD9JVYObvhIDkLgm1SDlWb8TY/ fa7Q== Received: by 10.66.88.39 with SMTP id bd7mr8304673pab.50.1342792869370; Fri, 20 Jul 2012 07:01:09 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id ob9sm4030704pbb.28.2012.07.20.07.01.06 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jul 2012 07:01:08 -0700 (PDT) From: Prabhakar Lad To: LMML Subject: [PATCH] davinci: vpbe: fix check for s_dv_preset function pointer Date: Fri, 20 Jul 2012 19:30:57 +0530 Message-ID: <1342792857-16421-1-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 X-pstn-levels: (S:20.98067/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:not-enabled X-pstn-settings: 2 (0.5000:0.0500) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: dlos 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 From: Lad, Prabhakar fix check for s_dv_preset function pointer to be NULL. return -EINVAL if function pointer is NULL. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli --- drivers/media/video/davinci/vpbe_display.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/davinci/vpbe_display.c b/drivers/media/video/davinci/vpbe_display.c index e106b72..f78ccc0 100644 --- a/drivers/media/video/davinci/vpbe_display.c +++ b/drivers/media/video/davinci/vpbe_display.c @@ -1083,7 +1083,7 @@ vpbe_display_s_dv_preset(struct file *file, void *priv, } /* Set the given standard in the encoder */ - if (NULL != vpbe_dev->ops.s_dv_preset) + if (!vpbe_dev->ops.s_dv_preset) return -EINVAL; ret = vpbe_dev->ops.s_dv_preset(vpbe_dev, preset);