diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:21 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:21 -0500 |
commit | 657c2f2cbccbac88689ac5174fc13dd3f9aece34 (patch) | |
tree | cdb292c2da582d49a3908244914dd192535e76cd /drivers/infiniband/hw | |
parent | b47711bfbcd4eb77ca61ef0162487b20e023ae55 (diff) |
IB/ipath: Fix crash on unload introduced by sysfs changes
Commit 23b9c1ab ("Infiniband: make ipath driver use default driver
groups.") introduced a bug in the ipath driver where
ipath_device_create_group() fell through into the error path, even on
success, which meant that the sysfs groups it created would always get
removed right away. This made ipath_device_remove_group() hit the
BUG_ON() in sysfs_remove_group() when it tried to remove those groups a
second time.
Correct the return path so that the groups stick around until they are
supposed to be cleaned up.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index aa27ca9f03b1..e2a65349c824 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c | |||
@@ -770,7 +770,8 @@ int ipath_device_create_group(struct device *dev, struct ipath_devdata *dd) | |||
770 | if (ret) | 770 | if (ret) |
771 | goto bail_attrs; | 771 | goto bail_attrs; |
772 | 772 | ||
773 | sysfs_remove_group(&dev->kobj, &dev_counter_attr_group); | 773 | return 0; |
774 | |||
774 | bail_attrs: | 775 | bail_attrs: |
775 | sysfs_remove_group(&dev->kobj, &dev_attr_group); | 776 | sysfs_remove_group(&dev->kobj, &dev_attr_group); |
776 | bail: | 777 | bail: |