projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b611bb
)
sysfs: make sysfs_put() ignore NULL sd
author
Tejun Heo
<htejun@gmail.com>
Wed, 13 Jun 2007 18:45:13 +0000
(
03:45
+0900)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 11 Jul 2007 23:09:03 +0000
(16:09 -0700)
Make sysfs_put() ignore NULL sd instead of oopsing.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/sysfs.h
patch
|
blob
|
blame
|
history
diff --git
a/fs/sysfs/sysfs.h
b/fs/sysfs/sysfs.h
index 687d959f606d10093bab92a17a23affe320c435d..f4fdbbffd5715f72c60bc0fd6e71442262f7d79f 100644
(file)
--- a/
fs/sysfs/sysfs.h
+++ b/
fs/sysfs/sysfs.h
@@
-111,7
+111,7
@@
static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd)
static inline void sysfs_put(struct sysfs_dirent * sd)
{
- if (atomic_dec_and_test(&sd->s_count))
+ if (
sd &&
atomic_dec_and_test(&sd->s_count))
release_sysfs_dirent(sd);
}