From patchwork Mon Dec 3 02:50:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1831901 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by patchwork1.kernel.org (Postfix) with ESMTP id 918F9400ED for ; Mon, 3 Dec 2012 02:54:51 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qB32ouvw026362; Sun, 2 Dec 2012 20:50:56 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qB32ouni005629; Sun, 2 Dec 2012 20:50:56 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Sun, 2 Dec 2012 20:50:55 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id qB32ot7X019834; Sun, 2 Dec 2012 20:50:55 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4C74A80627; Sun, 2 Dec 2012 20:50:55 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id 33EBC80626 for ; Sun, 2 Dec 2012 20:50:53 -0600 (CST) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id qB32onr6000387 for ; Sun, 2 Dec 2012 20:50:49 -0600 (CST) Received: from psmtp.com (na3sys009amx180.postini.com [74.125.149.161]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id qB32omZ3011014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 2 Dec 2012 20:50:48 -0600 Received: from mail-qa0-f52.google.com ([209.85.216.52]) (using TLSv1) by na3sys009amx180.postini.com ([74.125.148.10]) with SMTP; Sun, 02 Dec 2012 18:50:48 PST Received: by mail-qa0-f52.google.com with SMTP id d13so918176qak.4 for ; Sun, 02 Dec 2012 18:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=5HK7s0FEG8kwM7zaDj4P2WAJrACenqlPJVQxrk2DmCE=; b=H8e9JQtg/i3vEl4uLj/iGIKl+BhbUvF+80WygUZ95QlfsmGnBITB9B6SbWrDfFWp7S 3gqOmIx89QPIQhrahICRhVUBfSE1GO/hF2vI/vSL4QXfAqxT4S5U+kecNn3jKoJUIuma xrpqVwQresX0dQ4HJRFn45eD+x9bThTFDp8Nzcsb+hvUM/PpZIymTxW36+5ewsLp2LtM VpTA0atMnI9OyXKdltGgTCLIhwXKGbOVoDDQUu4Otm/OdvXfm7ec/PtKtLlUgafu/q9j 1yLZkDP+UZXS4XuTu9mjjem8V3JJqN7Dcke3lmSkydiC8lSHSvZiha3Gxi4j5vlIwMAP mKnA== MIME-Version: 1.0 Received: by 10.224.195.136 with SMTP id ec8mr14594015qab.98.1354503047208; Sun, 02 Dec 2012 18:50:47 -0800 (PST) Received: by 10.229.126.165 with HTTP; Sun, 2 Dec 2012 18:50:47 -0800 (PST) Date: Sun, 2 Dec 2012 21:50:47 -0500 Message-ID: Subject: [PATCH -next] [media] media: davinci: vpbe: return error code on error in vpbe_display_g_crop() From: Wei Yongjun To: , , X-pstn-levels: (S: 7.16209/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] CC: , , 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: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Wei Yongjun We have assigned error code to 'ret' if crop->type is not V4L2_BUF_TYPE_VIDEO_OUTPUT, but never use it. We'd better return the error code on this error. Signed-off-by: Wei Yongjun Acked-by: Prabhakar Lad --- drivers/media/platform/davinci/vpbe_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 2bfde79..119a100 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -791,7 +791,6 @@ static int vpbe_display_g_crop(struct file *file, void *priv, struct vpbe_device *vpbe_dev = fh->disp_dev->vpbe_dev; struct osd_state *osd_device = fh->disp_dev->osd_device; struct v4l2_rect *rect = &crop->c; - int ret; v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev, "VIDIOC_G_CROP, layer id = %d\n", @@ -799,7 +798,7 @@ static int vpbe_display_g_crop(struct file *file, void *priv, if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { v4l2_err(&vpbe_dev->v4l2_dev, "Invalid buf type\n"); - ret = -EINVAL; + return -EINVAL; } osd_device->ops.get_layer_config(osd_device, layer->layer_info.id, cfg);