Skip to content

Commit

Permalink
media: amphion: fix UNUSED_VALUE issue reported by coverity
Browse files Browse the repository at this point in the history
[ Upstream commit cf6a063 ]

assign value '-EINVAL' to ret, but the stored value is overwritten
before it can be used

Fixes: 9f599f3 ("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>
  • Loading branch information
mingqian-0 authored and gregkh committed Sep 13, 2023
1 parent 60f6392 commit 932d84a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/amphion/vpu_cmds.c
Expand Up @@ -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;
Expand Down

0 comments on commit 932d84a

Please sign in to comment.