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: Mayank Suman <mayanksuman@live.com> Link: https://lore.kernel.org/r/PS1PR04MB2934D85E82A3730349F56FE9D6849@PS1PR04MB2934.apcprd04.prod.outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6c231d8e15
commit
05196d33ce
@@ -228,7 +228,7 @@ int gasket_sysfs_create_entries(struct device *device,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&mapping->mutex);
|
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) {
|
if (mapping->attribute_count == GASKET_SYSFS_MAX_NODES) {
|
||||||
dev_err(device,
|
dev_err(device,
|
||||||
"Maximum number of sysfs nodes reached for device\n");
|
"Maximum number of sysfs nodes reached for device\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user