android_kernel_xiaomi_sm8350/fs/sysfs
Tejun Heo 967e35dcc9 sysfs: cosmetic clean up on node creation failure paths
Node addition failure is detected by testing return value of
sysfs_addfm_finish() which returns the number of added and removed
nodes.  As the function is called as the last step of addition right
on top of error handling block, the if blocks looked like the
following.

	if (sysfs_addrm_finish(&acxt))
		success handling, usually return;
	/* fall through to error handling */

This is the opposite of usual convention in sysfs and makes the code
difficult to understand.  This patch inverts the test and makes those
blocks look more like others.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Gabriel C <nix.or.die@googlemail.com>
Cc: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-18 15:49:50 -07:00
..
bin.c sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
dir.c sysfs: cosmetic clean up on node creation failure paths 2007-07-18 15:49:50 -07:00
file.c sysfs: cosmetic clean up on node creation failure paths 2007-07-18 15:49:50 -07:00
group.c sysfs: make kobj point to sysfs_dirent instead of dentry 2007-07-11 16:09:08 -07:00
inode.c sysfs: make sysfs_init_inode() static 2007-07-18 15:49:49 -07:00
Makefile
mount.c sysfs: fix sysfs root inode nlink accounting 2007-07-18 15:49:49 -07:00
symlink.c sysfs: cosmetic clean up on node creation failure paths 2007-07-18 15:49:50 -07:00
sysfs.h sysfs: make sysfs_init_inode() static 2007-07-18 15:49:49 -07:00