]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
backlight: tps65217_bl: Remove unnecessary default brightness check
authorChristos Gkekas <chris.gekas@gmail.com>
Sun, 8 Oct 2017 21:56:48 +0000 (22:56 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 13 Oct 2017 09:41:31 +0000 (10:41 +0100)
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@gmail.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/tps65217_bl.c

index fd524ad860a57bd4ac11166eeef278ef306358a4..61ea82d2abf4ebb5e3bc2cec1e32315dced4d160 100644 (file)
@@ -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);