summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight
diff options
context:
space:
mode:
authorChristos Gkekas2017-10-08 23:56:48 +0200
committerLee Jones2017-10-13 11:41:31 +0200
commit5158cc2d4eca66c1c5ef1939d8fa02942f532515 (patch)
tree5e0f946a8da8ec1c868d776a2df816791d70b8ab /drivers/video/backlight
parentbacklight: pwm_bl: Fix overflow condition (diff)
downloadkernel-qcow2-linux-5158cc2d4eca66c1c5ef1939d8fa02942f532515.tar.gz
kernel-qcow2-linux-5158cc2d4eca66c1c5ef1939d8fa02942f532515.tar.xz
kernel-qcow2-linux-5158cc2d4eca66c1c5ef1939d8fa02942f532515.zip
backlight: tps65217_bl: Remove unnecessary default brightness check
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>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r--drivers/video/backlight/tps65217_bl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
index fd524ad860a5..61ea82d2abf4 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);