Commit 96002c0a authored by Daniil Dulov's avatar Daniil Dulov Committed by Hans Verkuil

media: cx24120: Add retval check for cx24120_message_send()

If cx24120_message_send() returns error, we should keep local struct
unchanged.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 5afc9a25 ("[media] Add support for TechniSat Skystar S2")
Signed-off-by: default avatarDaniil Dulov <d.dulov@aladdin.ru>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 35ca8ce4
......@@ -973,7 +973,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment