BUG_ON() Conversion in fs/sysfs/
authorEric Sesterhenn <snakebyte@gmx.de>
Fri, 31 Mar 2006 23:18:38 +0000 (01:18 +0200)
committerAdrian Bunk <bunk@stusta.de>
Fri, 31 Mar 2006 23:18:38 +0000 (01:18 +0200)
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/sysfs/inode.c

index 4c29ac4..f0b347b 100644 (file)
@@ -175,8 +175,7 @@ const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
        struct bin_attribute * bin_attr;
        struct sysfs_symlink  * sl;
 
-       if (!sd || !sd->s_element)
-               BUG();
+       BUG_ON(!sd || !sd->s_element);
 
        switch (sd->s_type) {
                case SYSFS_DIR: