aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/ccwgroup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index dc1c5f4dd256..3964056a9a47 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -75,8 +75,10 @@ static void ccwgroup_ungroup_callback(struct device *dev)
75 struct ccwgroup_device *gdev = to_ccwgroupdev(dev); 75 struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
76 76
77 mutex_lock(&gdev->reg_mutex); 77 mutex_lock(&gdev->reg_mutex);
78 __ccwgroup_remove_symlinks(gdev); 78 if (device_is_registered(&gdev->dev)) {
79 device_unregister(dev); 79 __ccwgroup_remove_symlinks(gdev);
80 device_unregister(dev);
81 }
80 mutex_unlock(&gdev->reg_mutex); 82 mutex_unlock(&gdev->reg_mutex);
81} 83}
82 84