Skip to content
Commit 9e76f2cf authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: vidtv: remove an impossible condition



As warned by smatch:

	drivers/media/test-drivers/vidtv/vidtv_psi.c:93 vidtv_psi_update_version_num() warn: impossible condition '(h->version > 32) => (0-31 > 32)'

h_version is declared as:

		u8  version:5;

Meaning that its value ranges from 0 to 31. Incrementing 31 on such
data will overflow to zero, as expected.

So, just drop the uneeded overflow check.

While here, use "foo++" instead of "++foo", as this is a much
more common pattern.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ad458524
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment