Skip to content

Commit

Permalink
[SCSI] add failure return to scsi_init_shared_tag_map()
Browse files Browse the repository at this point in the history
And use it in the stex driver.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed Sep 2, 2006
1 parent cf35588 commit deb81d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/stex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion include/scsi/scsi_tcq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit deb81d8

Please sign in to comment.