firmware: edd: Remove redundant condition
The logic (!A || (A && B)) is equivalent to (!A || B). so we have to make code clear. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1650505393-19398-1-git-send-email-baihaowen@meizu.com Reviewed-by: Griffin Kroah-Hartman <griffin@kroah.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4388f887b8
commit
cebdc5349f
@ -685,8 +685,7 @@ static void edd_populate_dir(struct edd_device * edev)
|
||||
int i;
|
||||
|
||||
for (i = 0; (attr = edd_attrs[i]) && !error; i++) {
|
||||
if (!attr->test ||
|
||||
(attr->test && attr->test(edev)))
|
||||
if (!attr->test || attr->test(edev))
|
||||
error = sysfs_create_file(&edev->kobj,&attr->attr);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user