git: 68ec2949ad34 - main - lindebugfs: The Linux file operations use negative return values in the kernel.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Mar 2022 16:42:46 UTC
The branch main has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=68ec2949ad3411aa8a684dfca2cae90cbe202675
commit 68ec2949ad3411aa8a684dfca2cae90cbe202675
Author: Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-03-11 16:37:46 +0000
Commit: Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-03-11 16:41:33 +0000
lindebugfs: The Linux file operations use negative return values in the kernel.
Fix sign.
MFC after: 1 week
Sponsored by: NVIDIA Networking
---
sys/compat/lindebugfs/lindebugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c
index 9507cded9ebd..cbfdfbbce876 100644
--- a/sys/compat/lindebugfs/lindebugfs.c
+++ b/sys/compat/lindebugfs/lindebugfs.c
@@ -152,12 +152,12 @@ debugfs_fill(PFS_FILL_ARGS)
if (d->dm_fops->read)
rc = d->dm_fops->read(&lf, NULL, len, &off);
else
- rc = ENODEV;
+ rc = -ENODEV;
} else {
if (d->dm_fops->write)
rc = d->dm_fops->write(&lf, buf, len, &off);
else
- rc = ENODEV;
+ rc = -ENODEV;
}
if (d->dm_fops->release)
d->dm_fops->release(&vn, &lf);