aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_stats.c
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2016-03-20 19:06:21 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2016-03-20 19:06:21 +0000
commit2ad023130998069fa2b9a6a59bc1aeb62f8ff27b (patch)
treea525b8d51c8ed1087d09a3669879a8cbd769271c /sys/compat/linux/linux_stats.c
parent525c9796c39089332b5ae3ae87084d4b951f6785 (diff)
Notes
Diffstat (limited to 'sys/compat/linux/linux_stats.c')
-rw-r--r--sys/compat/linux/linux_stats.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
index 7b4017eb626d..3638c6be1ca0 100644
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -429,7 +429,9 @@ linux_statfs(struct thread *td, struct linux_statfs_args *args)
LFREEPATH(path);
if (error)
return (error);
- bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ if (error)
+ return (error);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}
@@ -510,8 +512,10 @@ linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args)
#endif
error = kern_fstatfs(td, args->fd, &bsd_statfs);
if (error)
- return error;
- bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ return (error);
+ error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ if (error)
+ return (error);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}