]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: amphion: fix UNUSED_VALUE issue reported by coverity
authorMing Qian <ming.qian@nxp.com>
Tue, 18 Jul 2023 09:50:12 +0000 (17:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:27 +0000 (09:48 +0200)
[ 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 <nicolas.dufresne@collabora.com>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/amphion/vpu_cmds.c

index 7e137f276c3b1438fae2e24116e4c2865e93fd3c..235b71398d4038f0ba24e5766173dc00c5e89571 100644 (file)
@@ -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;