mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
media: gspca: cpia1: Use min macro
Simplifies the code. Found by cocci: drivers/media/usb/gspca/cpia1.c:607:30-31: WARNING opportunity for min() Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-18-3c4865f5a4b0@chromium.org Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
48016551e0
commit
45fbce19e7
1 changed files with 2 additions and 4 deletions
|
@ -604,10 +604,8 @@ static int find_over_exposure(int brightness)
|
|||
MaxAllowableOverExposure = FLICKER_MAX_EXPOSURE - brightness -
|
||||
FLICKER_BRIGHTNESS_CONSTANT;
|
||||
|
||||
if (MaxAllowableOverExposure < FLICKER_ALLOWABLE_OVER_EXPOSURE)
|
||||
OverExposure = MaxAllowableOverExposure;
|
||||
else
|
||||
OverExposure = FLICKER_ALLOWABLE_OVER_EXPOSURE;
|
||||
OverExposure = min(MaxAllowableOverExposure,
|
||||
FLICKER_ALLOWABLE_OVER_EXPOSURE);
|
||||
|
||||
return OverExposure;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue