aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc/hpux
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/hpux')
-rw-r--r--arch/parisc/hpux/fs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index 12c04c5e558..bd9a4db3bd4 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -127,9 +127,8 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i
buf.error = 0;
error = vfs_readdir(file, filldir, &buf);
- if (error < 0)
- goto out_putf;
- error = buf.error;
+ if (error >= 0)
+ error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
if (put_user(file->f_pos, &lastdirent->d_off))