Skip to content

Commit

Permalink
[SCSI] ipr: remove an unneeded check
Browse files Browse the repository at this point in the history
"rc" is always zero here, so there is no need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Sep 14, 2012
1 parent d995e1b commit d12f157
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5847,7 +5847,7 @@ static int ipr_queuecommand(struct Scsi_Host *shost,
struct ipr_ioarcb *ioarcb;
struct ipr_cmnd *ipr_cmd;
unsigned long lock_flags;
int rc = 0;
int rc;

ioa_cfg = (struct ipr_ioa_cfg *)shost->hostdata;

Expand Down Expand Up @@ -5905,12 +5905,10 @@ static int ipr_queuecommand(struct Scsi_Host *shost,
(!ipr_is_gscsi(res) || scsi_cmd->cmnd[0] == IPR_QUERY_RSRC_STATE))
ioarcb->cmd_pkt.request_type = IPR_RQTYPE_IOACMD;

if (likely(rc == 0)) {
if (ioa_cfg->sis64)
rc = ipr_build_ioadl64(ioa_cfg, ipr_cmd);
else
rc = ipr_build_ioadl(ioa_cfg, ipr_cmd);
}
if (ioa_cfg->sis64)
rc = ipr_build_ioadl64(ioa_cfg, ipr_cmd);
else
rc = ipr_build_ioadl(ioa_cfg, ipr_cmd);

spin_lock_irqsave(shost->host_lock, lock_flags);
if (unlikely(rc || (!ioa_cfg->allow_cmds && !ioa_cfg->ioa_is_dead))) {
Expand Down

0 comments on commit d12f157

Please sign in to comment.