diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ubifs/dir.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 668ec3b90ea1..bd4a5e8ce441 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
| @@ -439,7 +439,7 @@ static unsigned int vfs_dent_type(uint8_t type) | |||
| 439 | */ | 439 | */ |
| 440 | static int ubifs_readdir(struct file *file, struct dir_context *ctx) | 440 | static int ubifs_readdir(struct file *file, struct dir_context *ctx) |
| 441 | { | 441 | { |
| 442 | int err; | 442 | int err = 0; |
| 443 | struct qstr nm; | 443 | struct qstr nm; |
| 444 | union ubifs_key key; | 444 | union ubifs_key key; |
| 445 | struct ubifs_dent_node *dent; | 445 | struct ubifs_dent_node *dent; |
| @@ -541,14 +541,12 @@ out: | |||
| 541 | kfree(file->private_data); | 541 | kfree(file->private_data); |
| 542 | file->private_data = NULL; | 542 | file->private_data = NULL; |
| 543 | 543 | ||
| 544 | if (err != -ENOENT) { | 544 | if (err != -ENOENT) |
| 545 | ubifs_err(c, "cannot find next direntry, error %d", err); | 545 | ubifs_err(c, "cannot find next direntry, error %d", err); |
| 546 | return err; | ||
| 547 | } | ||
| 548 | 546 | ||
| 549 | /* 2 is a special value indicating that there are no more direntries */ | 547 | /* 2 is a special value indicating that there are no more direntries */ |
| 550 | ctx->pos = 2; | 548 | ctx->pos = 2; |
| 551 | return 0; | 549 | return err; |
| 552 | } | 550 | } |
| 553 | 551 | ||
| 554 | /* Free saved readdir() state when the directory is closed */ | 552 | /* Free saved readdir() state when the directory is closed */ |
