diff options
-rw-r--r-- | fs/sysfs/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 0344ee70a47..48ffbdf0d01 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -590,8 +590,8 @@ struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd, | |||
590 | #undef node | 590 | #undef node |
591 | } | 591 | } |
592 | 592 | ||
593 | if (found && ns) { | 593 | if (found) { |
594 | while (found->s_ns && found->s_ns != ns) { | 594 | while (found->s_ns != ns) { |
595 | p = rb_next(&found->name_node); | 595 | p = rb_next(&found->name_node); |
596 | if (!p) | 596 | if (!p) |
597 | return NULL; | 597 | return NULL; |
@@ -947,7 +947,7 @@ static struct sysfs_dirent *sysfs_dir_pos(const void *ns, | |||
947 | #undef node | 947 | #undef node |
948 | } | 948 | } |
949 | } | 949 | } |
950 | while (pos && pos->s_ns && pos->s_ns != ns) { | 950 | while (pos && pos->s_ns != ns) { |
951 | struct rb_node *p = rb_next(&pos->inode_node); | 951 | struct rb_node *p = rb_next(&pos->inode_node); |
952 | if (!p) | 952 | if (!p) |
953 | pos = NULL; | 953 | pos = NULL; |
@@ -967,7 +967,7 @@ static struct sysfs_dirent *sysfs_dir_next_pos(const void *ns, | |||
967 | pos = NULL; | 967 | pos = NULL; |
968 | else | 968 | else |
969 | pos = rb_entry(p, struct sysfs_dirent, inode_node); | 969 | pos = rb_entry(p, struct sysfs_dirent, inode_node); |
970 | } while (pos && pos->s_ns && pos->s_ns != ns); | 970 | } while (pos && pos->s_ns != ns); |
971 | return pos; | 971 | return pos; |
972 | } | 972 | } |
973 | 973 | ||