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

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.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c231d8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");