From patchwork Mon Apr 23 11:22:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10356861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43D18601BE for ; Mon, 23 Apr 2018 11:22:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 348F128A7F for ; Mon, 23 Apr 2018 11:22:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2838728A8A; Mon, 23 Apr 2018 11:22:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,URIBL_RHS_DOB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8330D28AD3 for ; Mon, 23 Apr 2018 11:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754718AbeDWLWY (ORCPT ); Mon, 23 Apr 2018 07:22:24 -0400 Received: from osg.samsung.com ([64.30.133.232]:39373 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754692AbeDWLWY (ORCPT ); Mon, 23 Apr 2018 07:22:24 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id B56C23D769; Mon, 23 Apr 2018 04:22:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o1uXX8sOXmlt; Mon, 23 Apr 2018 04:22:22 -0700 (PDT) Received: from smtp.s-opensource.com (177.18.30.209.dynamic.adsl.gvt.net.br [177.18.30.209]) by osg.samsung.com (Postfix) with ESMTPSA id 7E7FC3D763; Mon, 23 Apr 2018 04:22:22 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1fAZY4-00015P-1d; Mon, 23 Apr 2018 07:22:20 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , "Lad, Prabhakar" Subject: [PATCH] media: davinci: don't override the error code Date: Mon, 23 Apr 2018 07:22:19 -0400 Message-Id: X-Mailer: git-send-email 2.14.3 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As warned by Coverity: CID 1415211 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value: Assigning value -22 to ret here, but that stored value is overwritten before it can be used. On all cases where the there's a goto 'unlock_out' or 'streamof', ret was filled with a non-sero value. It toesn't make sense to override such error code with a videobuf_streamoff() error. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus --- drivers/media/platform/davinci/vpfe_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 6f44abf7fa31..8613358ed245 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -1509,7 +1509,7 @@ static int vpfe_streamon(struct file *file, void *priv, unlock_out: mutex_unlock(&vpfe_dev->lock); streamoff: - ret = videobuf_streamoff(&vpfe_dev->buffer_queue); + videobuf_streamoff(&vpfe_dev->buffer_queue); return ret; }