diff options
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 4e2f2bbf4ba..46c021d880d 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -164,7 +164,8 @@ static int css_sch_device_register(struct subchannel *sch) | |||
164 | void css_sch_device_unregister(struct subchannel *sch) | 164 | void css_sch_device_unregister(struct subchannel *sch) |
165 | { | 165 | { |
166 | mutex_lock(&sch->reg_mutex); | 166 | mutex_lock(&sch->reg_mutex); |
167 | device_unregister(&sch->dev); | 167 | if (device_is_registered(&sch->dev)) |
168 | device_unregister(&sch->dev); | ||
168 | mutex_unlock(&sch->reg_mutex); | 169 | mutex_unlock(&sch->reg_mutex); |
169 | } | 170 | } |
170 | EXPORT_SYMBOL_GPL(css_sch_device_unregister); | 171 | EXPORT_SYMBOL_GPL(css_sch_device_unregister); |