提交 5158cc2d 编写于 作者: C Christos Gkekas 提交者: Lee Jones

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: NChristos Gkekas <chris.gekas@gmail.com>
Acked-by: NDaniel Thompson <daniel.thompson@linaro.org>
Acked-by: NJingoo Han <jingoohan1@gmail.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 5d0c49ac
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册