diff options
-rw-r--r-- | block/bsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c index 4eebcd5c7311..1ba9bc6d9a44 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -932,7 +932,8 @@ void bsg_unregister_queue(struct request_queue *q) | |||
932 | { | 932 | { |
933 | struct bsg_class_device *bcd = &q->bsg_dev; | 933 | struct bsg_class_device *bcd = &q->bsg_dev; |
934 | 934 | ||
935 | WARN_ON(!bcd->class_dev); | 935 | if (!bcd->class_dev) |
936 | return; | ||
936 | 937 | ||
937 | mutex_lock(&bsg_mutex); | 938 | mutex_lock(&bsg_mutex); |
938 | sysfs_remove_link(&q->kobj, "bsg"); | 939 | sysfs_remove_link(&q->kobj, "bsg"); |