projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
oprofilefs: don't oops on allocation failure
[linux-2.6-block.git]
/
drivers
/
oprofile
/
oprofilefs.c
diff --git
a/drivers/oprofile/oprofilefs.c
b/drivers/oprofile/oprofilefs.c
index d77ebbfc67c98f8b63cdde527b8a59d7135486bd..4ea08979312ca3e86804d5c7fa3e49be5969606a 100644
(file)
--- a/
drivers/oprofile/oprofilefs.c
+++ b/
drivers/oprofile/oprofilefs.c
@@
-138,6
+138,9
@@
static int __oprofilefs_create_file(struct dentry *root, char const *name,
struct dentry *dentry;
struct inode *inode;
+ if (!root)
+ return -ENOMEM;
+
inode_lock(d_inode(root));
dentry = d_alloc_name(root, name);
if (!dentry) {