module: fix redundant test.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 11 Apr 2016 19:33:09 +0000 (05:03 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 27 Jul 2016 03:08:00 +0000 (12:38 +0930)
commitc75b590d60ffa3e31bcb9608b68006a8bab9e0ed
tree7e67e27d736823cf0dfda9cd777ea1db569bf974
parentbf262dcec6383188a3324192c4a7e405b3b1ad23
module: fix redundant test.

[linux-4.5-rc4/kernel/module.c:1692]: (style) Redundant condition: attr.test.
'!attr.test || (attr.test && attr.test(mod))' is equivalent to '!attr.test ||
attr.test(mod)'

This code was added like this ten years ago, in c988d2b284549
"modules: add version and srcversion to sysfs".

Reported-by: David Binderman <dcb314@hotmail.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c