Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 May 2025 10:45:30 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 76b66ac45ea8 - main - LinuxKPI: style
Message-ID:  <202505051045.545AjUgh050286@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505051045.545AjUgh050286>