Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2df9dda0 authored by Matthias Schwarzott's avatar Matthias Schwarzott Committed by Mauro Carvalho Chehab
Browse files

[media] si2165: avoid division by zero



When si2165_init fails, the clk values in state are still at zero.
But the dvb-core ignores the return value of init will call tune
afterwards.
This will trigger a division by zero when tuning.
At least check for the variables to be non-zero before dividing.

This happened for a system with WinTV HVR-4400 PCIe-card after suspend-to-disk.
Do suspend-to-disk without accessing the DVB device before.
After wakeup try to tune.
si2165_init fails at checking the chip_mode and aborts.
Then si2165_set_if_freq_shift will fail with div-by-zero.

Signed-off-by: default avatarMatthias Schwarzott <zzam@gentoo.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent c0bf09d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment