diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 5b40a846ff9..ed55979bfd3 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -451,12 +451,18 @@ bail: | |||
451 | return ret; | 451 | return ret; |
452 | } | 452 | } |
453 | 453 | ||
454 | static void remove_file(struct dentry *parent, char *name) | 454 | static int remove_file(struct dentry *parent, char *name) |
455 | { | 455 | { |
456 | struct dentry *tmp; | 456 | struct dentry *tmp; |
457 | int ret; | ||
457 | 458 | ||
458 | tmp = lookup_one_len(name, parent, strlen(name)); | 459 | tmp = lookup_one_len(name, parent, strlen(name)); |
459 | 460 | ||
461 | if (IS_ERR(tmp)) { | ||
462 | ret = PTR_ERR(tmp); | ||
463 | goto bail; | ||
464 | } | ||
465 | |||
460 | spin_lock(&dcache_lock); | 466 | spin_lock(&dcache_lock); |
461 | spin_lock(&tmp->d_lock); | 467 | spin_lock(&tmp->d_lock); |
462 | if (!(d_unhashed(tmp) && tmp->d_inode)) { | 468 | if (!(d_unhashed(tmp) && tmp->d_inode)) { |
@@ -469,6 +475,14 @@ static void remove_file(struct dentry *parent, char *name) | |||
469 | spin_unlock(&tmp->d_lock); | 475 | spin_unlock(&tmp->d_lock); |
470 | spin_unlock(&dcache_lock); | 476 | spin_unlock(&dcache_lock); |
471 | } | 477 | } |
478 | |||
479 | ret = 0; | ||
480 | bail: | ||
481 | /* | ||
482 | * We don't expect clients to care about the return value, but | ||
483 | * it's there if they need it. | ||
484 | */ | ||
485 | return ret; | ||
472 | } | 486 | } |
473 | 487 | ||
474 | static int remove_device_files(struct super_block *sb, | 488 | static int remove_device_files(struct super_block *sb, |