Browse Source

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>
Christos Gkekas 7 năm trước cách đây
mục cha
commit
5158cc2d4e
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      drivers/video/backlight/tps65217_bl.c

+ 1 - 2
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);