Răsfoiți Sursa

[PATCH] Bogus NULL pointer check in fs/configfs/dir.c

We check the "group" pointer after we dereference it.  This check is
bogus, as it cannot be NULL coming in.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Eric Sesterhenn 19 ani în urmă
părinte
comite
cbca692c24
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      fs/configfs/dir.c

+ 1 - 1
fs/configfs/dir.c

@@ -504,7 +504,7 @@ static int populate_groups(struct config_group *group)
 	int ret = 0;
 	int ret = 0;
 	int i;
 	int i;
 
 
-	if (group && group->default_groups) {
+	if (group->default_groups) {
 		/* FYI, we're faking mkdir here
 		/* FYI, we're faking mkdir here
 		 * I'm not sure we need this semaphore, as we're called
 		 * I'm not sure we need this semaphore, as we're called
 		 * from our parent's mkdir.  That holds our parent's
 		 * from our parent's mkdir.  That holds our parent's