git: 76b66ac45ea8 - main - LinuxKPI: style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 May 2025 10:45:30 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=76b66ac45ea804f23ffb35712b0ceaa98864c06f
commit 76b66ac45ea804f23ffb35712b0ceaa98864c06f
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-05-04 19:52:11 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-05-05 10:44:22 +0000
LinuxKPI: style
Check results of non-bool to be != 0.
No functional changes intended.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50158
---
sys/compat/linuxkpi/common/src/linux_kobject.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/compat/linuxkpi/common/src/linux_kobject.c b/sys/compat/linuxkpi/common/src/linux_kobject.c
index 02f8b8d5b709..2b9d3dcffa4b 100644
--- a/sys/compat/linuxkpi/common/src/linux_kobject.c
+++ b/sys/compat/linuxkpi/common/src/linux_kobject.c
@@ -122,10 +122,10 @@ kobject_add_complete(struct kobject *kobj)
for (attr = t->default_attrs; *attr != NULL; attr++) {
error = sysfs_create_file(kobj, *attr);
- if (error)
+ if (error != 0)
break;
}
- if (error)
+ if (error != 0)
sysfs_remove_dir(kobj);
}