Re: [PATCH] cklight: tps65217_bl: Remove unnecessary default brightness check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 08 Oct 2017, Christos Gkekas wrote:

> Variable val holds the default brightness and is unsigned, therefore
> checking whether it is less than zero is redundant.
> 
> Signed-off-by: Christos Gkekas <chris.gekas@xxxxxxxxx>
> ---
>  drivers/video/backlight/tps65217_bl.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Subject line fixed and patch applied, thanks.

> diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
> index fd524ad..61ea82d 100644
> --- a/drivers/video/backlight/tps65217_bl.c
> +++ b/drivers/video/backlight/tps65217_bl.c
> @@ -239,8 +239,7 @@ tps65217_bl_parse_dt(struct platform_device *pdev)
>  	}
>  
>  	if (!of_property_read_u32(node, "default-brightness", &val)) {
> -		if (val < 0 ||
> -			val > 100) {
> +		if (val > 100) {
>  			dev_err(&pdev->dev,
>  				"invalid 'default-brightness' value in the device tree\n");
>  			err = ERR_PTR(-EINVAL);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux