Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df468820b6881fc14e50f6b2fcffd3e945417d68 Commit: df468820b6881fc14e50f6b2fcffd3e945417d68 Parent: 39dca558a5b52b63e49bc234a7e887be092aa690 Author: FUJITA Tomonori <[EMAIL PROTECTED]> AuthorDate: Sat Jul 21 13:23:25 2007 +0900 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Sat Jul 21 08:58:41 2007 -0500
[SCSI] bsg: fix bsg_unregister_queue 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 <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- 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_queue *q) { 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"); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html