diff options
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r-- | fs/sysfs/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 09a0611b3364..387a63662793 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -365,9 +365,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file) | |||
365 | /* if the kobject has no ktype, then we assume that it is a subsystem | 365 | /* if the kobject has no ktype, then we assume that it is a subsystem |
366 | * itself, and use ops for it. | 366 | * itself, and use ops for it. |
367 | */ | 367 | */ |
368 | if (kobj->kset && kobj->kset->ktype) | 368 | if (kobj->ktype) |
369 | ops = kobj->kset->ktype->sysfs_ops; | ||
370 | else if (kobj->ktype) | ||
371 | ops = kobj->ktype->sysfs_ops; | 369 | ops = kobj->ktype->sysfs_ops; |
372 | else | 370 | else |
373 | ops = &subsys_sysfs_ops; | 371 | ops = &subsys_sysfs_ops; |