diff options
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r-- | fs/sysfs/file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 1beaa739d0a6..da3fefe91a8f 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) | |||
340 | char *p; | 340 | char *p; |
341 | 341 | ||
342 | p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file)); | 342 | p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file)); |
343 | if (p) | 343 | if (!IS_ERR(p)) |
344 | memmove(last_sysfs_file, p, strlen(p) + 1); | 344 | memmove(last_sysfs_file, p, strlen(p) + 1); |
345 | 345 | ||
346 | /* need attr_sd for attr and ops, its parent for kobj */ | 346 | /* need attr_sd for attr and ops, its parent for kobj */ |
@@ -593,7 +593,8 @@ EXPORT_SYMBOL_GPL(sysfs_add_file_to_group); | |||
593 | * @mode: file permissions. | 593 | * @mode: file permissions. |
594 | * | 594 | * |
595 | */ | 595 | */ |
596 | int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode) | 596 | int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, |
597 | mode_t mode) | ||
597 | { | 598 | { |
598 | struct sysfs_dirent *sd; | 599 | struct sysfs_dirent *sd; |
599 | struct iattr newattrs; | 600 | struct iattr newattrs; |