summaryrefslogtreecommitdiff
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorMika Kukkonen <mika@osdl.org>2004-06-29 05:20:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-29 05:20:18 -0700
commit55be71cfb77dc0a0a59716be3e1ac7946245ef67 (patch)
treef4ef8f0add1a80b9755c4282cc821543caaac4be /lib/kobject.c
parent9e1674efe516272452bfaf9639cbeb418c92fac1 (diff)
[PATCH] Combined patch for remaining trivial sparse warnings in allnoconfig build
Well, one of these (fs/block_dev.c) is little non-trivial, but i felt throwing that away would be a shame (and I did add comments ;-). Also almost all of these have been submitted earlier through other channels, but have not been picked up (the only controversial is again the fs/block_dev.c patch, where Linus felt a better job would be done with __ffs(), but I could not convince myself that is does the same thing as original code). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 5c2ade5739be..9b2519ee6e8c 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -37,7 +37,7 @@ static int populate_dir(struct kobject * kobj)
int i;
if (t && t->default_attrs) {
- for (i = 0; (attr = t->default_attrs[i]); i++) {
+ for (i = 0; (attr = t->default_attrs[i]) != NULL; i++) {
if ((error = sysfs_create_file(kobj,attr)))
break;
}