From 41aaf0f80755309c4f33e1ed2865352b013164ba Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 1 Sep 2006 09:28:48 -0400 Subject: [PATCH] --- yaml --- r: 35031 b: refs/heads/master c: deb81d80ba27da8dfabc29ccb5977db8f4942a0a h: refs/heads/master i: 35029: 0fb745aeb27c4c081bb1ce00c672af591001d086 35027: 99baa84051146a964c3d1aff9af3cee57e28672d 35023: 533f32e0446994b1031591ba38e22ff5a21a3cf6 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/stex.c | 5 ++--- trunk/include/scsi/scsi_tcq.h | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index db92507a5cff..9392e511ffb1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cf355883f506051a8ce3ac4539752829320b6c8c +refs/heads/master: deb81d80ba27da8dfabc29ccb5977db8f4942a0a diff --git a/trunk/drivers/scsi/stex.c b/trunk/drivers/scsi/stex.c index 15fb99f224ee..3cf3106a29b8 100644 --- a/trunk/drivers/scsi/stex.c +++ b/trunk/drivers/scsi/stex.c @@ -1108,9 +1108,8 @@ stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (err) goto out_free_irq; - scsi_init_shared_tag_map(host, ST_CAN_QUEUE); - if (host->bqt == NULL) { - err = -ENOMEM; + err = scsi_init_shared_tag_map(host, ST_CAN_QUEUE); + if (err) { printk(KERN_ERR DRV_NAME "(%s): init shared queue failed\n", pci_name(pdev)); goto out_free_irq; diff --git a/trunk/include/scsi/scsi_tcq.h b/trunk/include/scsi/scsi_tcq.h index 4eea254b1ce9..d04d05adfa9b 100644 --- a/trunk/include/scsi/scsi_tcq.h +++ b/trunk/include/scsi/scsi_tcq.h @@ -138,9 +138,10 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag) * @shost: the host to share the tag map among all devices * @depth: the total depth of the map */ -static inline void scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) +static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) { shost->bqt = blk_init_tags(depth); + return shost->bqt ? 0 : -ENOMEM; } #endif /* _SCSI_SCSI_TCQ_H */