From: Eric Sesterhenn Date: Fri, 31 Mar 2006 23:18:38 +0000 (+0200) Subject: BUG_ON() Conversion in fs/sysfs/ X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=99cee0cd7560fc4e7f3646ee18d90e328bd1cb32;p=openwrt%2Fstaging%2Fblogic.git 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 4c29ac41ac3e..f0b347bd12ca 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: