mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
media: stb0899: Simplify check
chip_id is an unsigned number, it can never be < 0 Fixes cocci check: drivers/media/dvb-frontends/stb0899_drv.c:1280:8-15: WARNING: Unsigned expression compared with zero: chip_id > 0 Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-2-3c4865f5a4b0@chromium.org Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
ff924ca08e
commit
c039459368
@ -1277,7 +1277,7 @@ static int stb0899_get_dev_id(struct stb0899_state *state)
|
||||
dprintk(state->verbose, FE_ERROR, 1, "Demodulator Core ID=[%s], Version=[%d]", (char *) &demod_str, demod_ver);
|
||||
CONVERT32(STB0899_READ_S2REG(STB0899_S2FEC, FEC_CORE_ID_REG), (char *)&fec_str);
|
||||
fec_ver = STB0899_READ_S2REG(STB0899_S2FEC, FEC_VER_ID_REG);
|
||||
if (! (chip_id > 0)) {
|
||||
if (!chip_id) {
|
||||
dprintk(state->verbose, FE_ERROR, 1, "couldn't find a STB 0899");
|
||||
|
||||
return -ENODEV;
|
||||
|
Loading…
Reference in New Issue
Block a user