]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipath: Fix crash on unload introduced by sysfs changes
authorRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:21 +0000 (14:15 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:21 +0000 (14:15 -0800)
commit1564b3c54cd80b4f727ad3fc79df0627620fe96c
treecdb292c2da582d49a3908244914dd192535e76cd
parentc5e579f0b127b5715c92188ce24a289ecdad575b
IB/ipath: Fix crash on unload introduced by sysfs changes

Commit 426eb412 ("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>
drivers/infiniband/hw/ipath/ipath_sysfs.c