Skip to content

Commit aa7d16b

Browse files
GustavoARSilvaandy-shev
authored andcommitted
platform/x86: acer-wmi: refactor function has_cap
Refactor function has_cap in order to avoid returning integer values, when instead it should return booleans. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent d22296d commit aa7d16b

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/platform/x86/acer-wmi.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,7 @@ static void __init find_quirks(void)
672672

673673
static bool has_cap(u32 cap)
674674
{
675-
if ((interface->capability & cap) != 0)
676-
return 1;
677-
678-
return 0;
675+
return interface->capability & cap;
679676
}
680677

681678
/*

0 commit comments

Comments
 (0)