diff options
| author | Sergey Shtylyov <s.shtylyov@auroraos.dev> | 2026-02-06 17:22:26 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-03-16 16:30:20 +0100 |
| commit | dde3c37af95cd6fa301c4906f33d627bc9dd874c (patch) | |
| tree | a793a4f8c1ba2f6e92ba3d7ecb0d647e01561bf3 /tools/lib/python | |
| parent | f48753aa3a109051e63e050e796f7d4cc6f22d3c (diff) | |
media: dib8000: avoid division by 0 in dib8000_set_dds()
In dib8000_set_dds(), 1 << 26 (67108864) divided by e.g. 1 apparently can't
fit into 16-bit variable unit_khz_dds_val, being truncated to 0; this will
cause division by 0 while calling dprintk() with debugging enabled (via the
module parameter). Use s32 instead of s16 to declare the variable, getting
rid of the cast to u16 in the *else* branch as well...
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Fixes: 173a64cb3fcf ("[media] dib8000: enhancement")
Cc: stable@vger.kernel.org
Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
