From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA90711710 for ; Mon, 11 Sep 2023 15:20:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3377FC433C8; Mon, 11 Sep 2023 15:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694445620; bh=iAZsJO6U/IuU7ETgURvt3NBTlpDBqzgP6w5ebJEmQiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U01G2NvPSXnQSDbB1PfZnb7UCEeaQjqXeR7qGRfaCQ/HY97A6W56uv/PUH7VtLrfY qTnOf5eSZ376SYC2+tHQannM4BdUMrTj+uLCqAP5ZuXMO233M27AFPjrNy1+UcTN7V TQM2O5+nAgEC3+SzHH/tWd9BJXOxZXIVzPZw35oc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolas Dufresne , Ming Qian , Hans Verkuil , Sasha Levin Subject: [PATCH 6.1 412/600] media: amphion: fix UNUSED_VALUE issue reported by coverity Date: Mon, 11 Sep 2023 15:47:25 +0200 Message-ID: <20230911134645.837091833@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134633.619970489@linuxfoundation.org> References: <20230911134633.619970489@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ming Qian [ Upstream commit cf6a06354989c41b536be8e094561ee16223cf1f ] assign value '-EINVAL' to ret, but the stored value is overwritten before it can be used Fixes: 9f599f351e86 ("media: amphion: add vpu core driver") Reviewed-by: Nicolas Dufresne Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/platform/amphion/vpu_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/amphion/vpu_cmds.c b/drivers/media/platform/amphion/vpu_cmds.c index 7e137f276c3b1..235b71398d403 100644 --- a/drivers/media/platform/amphion/vpu_cmds.c +++ b/drivers/media/platform/amphion/vpu_cmds.c @@ -315,7 +315,7 @@ static int vpu_session_send_cmd(struct vpu_inst *inst, u32 id, void *data) { unsigned long key; int sync = false; - int ret = -EINVAL; + int ret; if (inst->id < 0) return -EINVAL; -- 2.40.1