diff options
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index dfd7bc681c25..040e643746aa 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -227,6 +227,7 @@ static void ccwgroup_ungroup_workfn(struct work_struct *work) | |||
227 | container_of(work, struct ccwgroup_device, ungroup_work); | 227 | container_of(work, struct ccwgroup_device, ungroup_work); |
228 | 228 | ||
229 | ccwgroup_ungroup(gdev); | 229 | ccwgroup_ungroup(gdev); |
230 | put_device(&gdev->dev); | ||
230 | } | 231 | } |
231 | 232 | ||
232 | static void ccwgroup_release(struct device *dev) | 233 | static void ccwgroup_release(struct device *dev) |
@@ -412,8 +413,10 @@ static int ccwgroup_notifier(struct notifier_block *nb, unsigned long action, | |||
412 | { | 413 | { |
413 | struct ccwgroup_device *gdev = to_ccwgroupdev(data); | 414 | struct ccwgroup_device *gdev = to_ccwgroupdev(data); |
414 | 415 | ||
415 | if (action == BUS_NOTIFY_UNBIND_DRIVER) | 416 | if (action == BUS_NOTIFY_UNBIND_DRIVER) { |
417 | get_device(&gdev->dev); | ||
416 | schedule_work(&gdev->ungroup_work); | 418 | schedule_work(&gdev->ungroup_work); |
419 | } | ||
417 | 420 | ||
418 | return NOTIFY_OK; | 421 | return NOTIFY_OK; |
419 | } | 422 | } |