Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5158cc2d authored by Christos Gkekas's avatar Christos Gkekas Committed by Lee Jones
Browse files

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: default avatarChristos Gkekas <chris.gekas@gmail.com>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 5d0c49ac
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -239,8 +239,7 @@ tps65217_bl_parse_dt(struct platform_device *pdev)
	}
	}


	if (!of_property_read_u32(node, "default-brightness", &val)) {
	if (!of_property_read_u32(node, "default-brightness", &val)) {
		if (val < 0 ||
		if (val > 100) {
			val > 100) {
			dev_err(&pdev->dev,
			dev_err(&pdev->dev,
				"invalid 'default-brightness' value in the device tree\n");
				"invalid 'default-brightness' value in the device tree\n");
			err = ERR_PTR(-EINVAL);
			err = ERR_PTR(-EINVAL);