lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 9 Oct 2017 12:12:40 -0400 From: "Jingoo Han" <jingoohan1@...il.com> To: "'Christos Gkekas'" <chris.gekas@...il.com>, "'Lee Jones'" <lee.jones@...aro.org>, "'Daniel Thompson'" <daniel.thompson@...aro.org>, "'Bartlomiej Zolnierkiewicz'" <b.zolnierkie@...sung.com>, <linux-fbdev@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] cklight: tps65217_bl: Remove unnecessary default brightness check On Sunday, October 8, 2017 5:57 PM, Christos Gkekas wrote: > > 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@...il.com> It looks good. Acked-by: Jingoo Han <jingoohan1@...il.com> Best regards, Jingoo Han > --- > drivers/video/backlight/tps65217_bl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/video/backlight/tps65217_bl.c > b/drivers/video/backlight/tps65217_bl.c > index fd524ad..61ea82d 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); > -- > 2.7.4
Powered by blists - more mailing lists