mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
media: qcom: camss: clean up a check
Imagine that "->vfe_num" is zero, then the subtraction will underflow to UINT_MAX. Plus it's just cleaner to use >= instead. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
ce122258ed
commit
0cb8c94825
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ static int ispif_vfe_reset(struct ispif_device *ispif, u8 vfe_id)
|
||||||
unsigned long time;
|
unsigned long time;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
if (vfe_id > camss->res->vfe_num - 1) {
|
if (vfe_id >= camss->res->vfe_num) {
|
||||||
dev_err(camss->dev,
|
dev_err(camss->dev,
|
||||||
"Error: asked reset for invalid VFE%d\n", vfe_id);
|
"Error: asked reset for invalid VFE%d\n", vfe_id);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
Loading…
Reference in a new issue