sysfs: dir.c: fix up odd do/while indentation
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Aug 2013 23:36:02 +0000 (16:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Aug 2013 23:36:02 +0000 (16:36 -0700)
This fixes up the odd do/while after an if statement warning in dir.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/dir.c

index 158227e03b7148eb20e3791cff29d98ebcb8c709..99ec5b40e977730a3613ff295740446e651fba42 100644 (file)
@@ -990,13 +990,14 @@ static struct sysfs_dirent *sysfs_dir_next_pos(const void *ns,
        struct sysfs_dirent *parent_sd, ino_t ino, struct sysfs_dirent *pos)
 {
        pos = sysfs_dir_pos(ns, parent_sd, ino, pos);
-       if (pos) do {
-               struct rb_node *node = rb_next(&pos->s_rb);
-               if (!node)
-                       pos = NULL;
-               else
-                       pos = to_sysfs_dirent(node);
-       } while (pos && pos->s_ns != ns);
+       if (pos)
+               do {
+                       struct rb_node *node = rb_next(&pos->s_rb);
+                       if (!node)
+                               pos = NULL;
+                       else
+                               pos = to_sysfs_dirent(node);
+               } while (pos && pos->s_ns != ns);
        return pos;
 }