Skip to content

Commit

Permalink
scsi: ibmvfc: don't check for failure from mempool_alloc()
Browse files Browse the repository at this point in the history
mempool_alloc() cannot fail when passed GFP_NOIO or any other gfp
setting that is permitted to sleep.  So remove this pointless code.

Signed-off-by: NeilBrown <neilb@suse.com>
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
NeilBrown authored and Martin K. Petersen committed Apr 19, 2017
1 parent 8d4208c commit 5c66d93
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/scsi/ibmvscsi/ibmvfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3910,12 +3910,6 @@ static int ibmvfc_alloc_target(struct ibmvfc_host *vhost, u64 scsi_id)
spin_unlock_irqrestore(vhost->host->host_lock, flags);

tgt = mempool_alloc(vhost->tgt_pool, GFP_NOIO);
if (!tgt) {
dev_err(vhost->dev, "Target allocation failure for scsi id %08llx\n",
scsi_id);
return -ENOMEM;
}

memset(tgt, 0, sizeof(*tgt));
tgt->scsi_id = scsi_id;
tgt->new_scsi_id = scsi_id;
Expand Down

0 comments on commit 5c66d93

Please sign in to comment.