staging: gasket Fix comparision with Null
diff mbox series

Message ID PS1PR04MB2934DD6390C8B16DB832BC97D6869@PS1PR04MB2934.apcprd04.prod.outlook.com
State Accepted
Commit 05196d33ce409eef158e064af91cdb3fd7aa639e
Headers show
Series
  • staging: gasket Fix comparision with Null
Related show

Commit Message

Mayank Suman Feb. 17, 2021, 1:28 p.m. UTC
From: Mayank Suman <mayanksuman@live.com>

The change was suggested by checkpatch.pl.

Signed-off-by: Mayank Suman <mayanksuman@live.com>
---
 drivers/staging/gasket/gasket_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Feb. 17, 2021, 3:19 p.m. UTC | #1
On Wed, Feb 17, 2021 at 06:58:16PM +0530, mayanksuman@live.com wrote:
> From: Mayank Suman <mayanksuman@live.com>
> 
> The change was suggested by checkpatch.pl.

What change?

Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/SubmittingPatches for a description of how to
write a good changelog text.

thanks,

greg k-h

Patch
diff mbox series

diff --git a/drivers/staging/gasket/gasket_sysfs.c b/drivers/staging/gasket/gasket_sysfs.c
index af26bc9f1..c5658fdf4 100644
--- a/drivers/staging/gasket/gasket_sysfs.c
+++ b/drivers/staging/gasket/gasket_sysfs.c
@@ -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");