From: Tejun Heo Date: Sat, 23 Nov 2013 22:21:47 +0000 (-0500) Subject: sysfs: make __sysfs_add_one() fail if the parent isn't a directory X-Git-Tag: v3.14-rc1~151^2~115 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae2108ad32f5ca55e9895d5597e6552be1607569;p=pandora-kernel.git sysfs: make __sysfs_add_one() fail if the parent isn't a directory Currently the kobject based interface guarantees that a parent sysfs_dirent is always a directory; however, the planned kernfs interface will be directly based on sysfs_dirents and the caller may specify non-directory node as the parent. Add an explicit check in __sysfs_add_one() so that such attempts fail with -EINVAL. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed