summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDaniil Dulov <d.dulov@aladdin.ru>2023-06-02 11:55:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-23 11:46:57 +0300
commit1b64c138d00fca2685203262772c0d65f0d6d093 (patch)
tree242a3e7f146f528bac5cd7eae4df17d364646bee /drivers/media
parent809623fedc31f4e74039d93bb75a8993635d7534 (diff)
downloadlinux-1b64c138d00fca2685203262772c0d65f0d6d093.tar.xz
media: cx24120: Add retval check for cx24120_message_send()
[ Upstream commit 96002c0ac824e1773d3f706b1f92e2a9f2988047 ] If cx24120_message_send() returns error, we should keep local struct unchanged. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5afc9a25be8d ("[media] Add support for TechniSat Skystar S2") Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb-frontends/cx24120.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c
index 7f11dcc94d85..869fb1a9ddf3 100644
--- a/drivers/media/dvb-frontends/cx24120.c
+++ b/drivers/media/dvb-frontends/cx24120.c
@@ -980,7 +980,9 @@ static void cx24120_set_clock_ratios(struct dvb_frontend *fe)
cmd.arg[8] = (clock_ratios_table[idx].rate >> 8) & 0xff;
cmd.arg[9] = (clock_ratios_table[idx].rate >> 0) & 0xff;
- cx24120_message_send(state, &cmd);
+ ret = cx24120_message_send(state, &cmd);
+ if (ret != 0)
+ return;
/* Calculate ber window rates for stat work */
cx24120_calculate_ber_window(state, clock_ratios_table[idx].rate);