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:42:51 +0000 (09:42 +0200)
commit932d84a8a808bc8f4eed85335fdafce119a60ddd
treeb3313d6a2c3a8cbdffc230e7cc729c5c53e3aa6c
parent60f6392bdede45e5bc966cbbe93a6597ac0c11e4
media: amphion: fix UNUSED_VALUE issue reported by coverity

[ 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