From: Eric Sesterhenn Date: Fri, 31 Mar 2006 23:18:38 +0000 (+0200) Subject: BUG_ON() Conversion in fs/sysfs/ X-Git-Tag: v2.6.17-rc1~10^2~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99cee0cd7560fc4e7f3646ee18d90e328bd1cb32;p=linux-2.6 BUG_ON() Conversion in fs/sysfs/ this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn Signed-off-by: Adrian Bunk --- diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 4c29ac41ac..f0b347bd12 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -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: