Skip to content

Commit

Permalink
BUG_ON() Conversion in fs/sysfs/
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Mar 31, 2006
1 parent 5df0d31 commit 99cee0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/sysfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 99cee0c

Please sign in to comment.