projects/linux·commit d3de0eb1

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

d3de0eb1 · Linus Torvalds <[email protected]> · 2010-09-07 14:04:59 -07:00

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  sysfs: checking for NULL instead of ERR_PTR
Commit
d3de0eb1642feda3c53fb455e7cf07b222deafb5
Parents
b06ac5a3 · 57f9bdac

Merge commit. Changes below are compared with the first parent: b06ac5a3.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
fs/sysfs/file.cmodified+1−1View file

fs/sysfs/file.c

View file
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 1b27b56..da3fefe 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -340,7 +340,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
char *p;
p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file));
- if (p)
+ if (!IS_ERR(p))
memmove(last_sysfs_file, p, strlen(p) + 1);
/* need attr_sd for attr and ops, its parent for kobj */