And use it in the stex driver.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
        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;
 
  * @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 */