* [PATCH] bsg: fix bsg_unregister_queue
@ 2007-07-21 4:23 FUJITA Tomonori
0 siblings, 0 replies; only message in thread
From: FUJITA Tomonori @ 2007-07-21 4:23 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, jens.axboe, fujita.tomonori
scsi_sysfs_add_sdev ignores the bsg_register_queue failure, so
bsg_unregister_queue must check whether the queue has a bsg device.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
block/bsg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block/bsg.c b/block/bsg.c
index 4eebcd5..1ba9bc6 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -932,7 +932,8 @@ void bsg_unregister_queue(struct request
{
struct bsg_class_device *bcd = &q->bsg_dev;
- WARN_ON(!bcd->class_dev);
+ if (!bcd->class_dev)
+ return;
mutex_lock(&bsg_mutex);
sysfs_remove_link(&q->kobj, "bsg");
--
1.4.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-21 4:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-21 4:23 [PATCH] bsg: fix bsg_unregister_queue FUJITA Tomonori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).