]> err.no Git - linux-2.6/blobdiff - drivers/s390/cio/css.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
[linux-2.6] / drivers / s390 / cio / css.c
index 4e2f2bbf4ba5172278d65c32fa6985a1caca86f0..46c021d880dc5ee7441cd11f8e885bf54d79b7dd 100644 (file)
@@ -164,7 +164,8 @@ static int css_sch_device_register(struct subchannel *sch)
 void css_sch_device_unregister(struct subchannel *sch)
 {
        mutex_lock(&sch->reg_mutex);
-       device_unregister(&sch->dev);
+       if (device_is_registered(&sch->dev))
+               device_unregister(&sch->dev);
        mutex_unlock(&sch->reg_mutex);
 }
 EXPORT_SYMBOL_GPL(css_sch_device_unregister);