]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
lindebugfs: The Linux file operations use negative return values in the kernel.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Fri, 11 Mar 2022 16:37:46 +0000 (17:37 +0100)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 17 Mar 2022 12:26:23 +0000 (13:26 +0100)
Fix sign.

Sponsored by: NVIDIA Networking
Approved by: re (gjb)

(cherry picked from commit 68ec2949ad3411aa8a684dfca2cae90cbe202675)
(cherry picked from commit a16772a8111095a0358be9c046d321988f2696c2)

sys/compat/lindebugfs/lindebugfs.c

index 9507cded9ebd9fc1a89b2a57aa8340d39a340ea4..cbfdfbbce8768f721e58977d272150f68dc7794a 100644 (file)
@@ -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);