aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/stex.c5
-rw-r--r--include/scsi/scsi_tcq.h3
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 15fb99f224ee..3cf3106a29b8 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1108,9 +1108,8 @@ stex_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1108 if (err) 1108 if (err)
1109 goto out_free_irq; 1109 goto out_free_irq;
1110 1110
1111 scsi_init_shared_tag_map(host, ST_CAN_QUEUE); 1111 err = scsi_init_shared_tag_map(host, ST_CAN_QUEUE);
1112 if (host->bqt == NULL) { 1112 if (err) {
1113 err = -ENOMEM;
1114 printk(KERN_ERR DRV_NAME "(%s): init shared queue failed\n", 1113 printk(KERN_ERR DRV_NAME "(%s): init shared queue failed\n",
1115 pci_name(pdev)); 1114 pci_name(pdev));
1116 goto out_free_irq; 1115 goto out_free_irq;
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h
index 4eea254b1ce9..d04d05adfa9b 100644
--- a/include/scsi/scsi_tcq.h
+++ b/include/scsi/scsi_tcq.h
@@ -138,9 +138,10 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag)
138 * @shost: the host to share the tag map among all devices 138 * @shost: the host to share the tag map among all devices
139 * @depth: the total depth of the map 139 * @depth: the total depth of the map
140 */ 140 */
141static inline void scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) 141static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth)
142{ 142{
143 shost->bqt = blk_init_tags(depth); 143 shost->bqt = blk_init_tags(depth);
144 return shost->bqt ? 0 : -ENOMEM;
144} 145}
145 146
146#endif /* _SCSI_SCSI_TCQ_H */ 147#endif /* _SCSI_SCSI_TCQ_H */