Commit 05196d33 authored by Mayank Suman's avatar Mayank Suman Committed by Greg Kroah-Hartman

staging: gasket Fix comparison with Null

Comparison with NULL is redundant
as pointer will evaluate to true if is non-NULL.
The change was suggested by checkpatch.pl.
Signed-off-by: default avatarMayank Suman <mayanksuman@live.com>
Link: https://lore.kernel.org/r/PS1PR04MB2934D85E82A3730349F56FE9D6849@PS1PR04MB2934.apcprd04.prod.outlook.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c231d8e
......@@ -228,7 +228,7 @@ int gasket_sysfs_create_entries(struct device *device,
}
mutex_lock(&mapping->mutex);
for (i = 0; attrs[i].attr.attr.name != NULL; i++) {
for (i = 0; attrs[i].attr.attr.name; i++) {
if (mapping->attribute_count == GASKET_SYSFS_MAX_NODES) {
dev_err(device,
"Maximum number of sysfs nodes reached for device\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment