Skip to content

Commit

Permalink
nvmet/fcloop: remove some logically dead code performing redundant re…
Browse files Browse the repository at this point in the history
…t checks

The check to see if ret is non-zero and return this rather than count
is redundant in two occassions.  It is redundant because prior to this
check, the return code ret is already checked for a non-zero error
return value and we return from the function at that point.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Colin Ian King authored and Christoph Hellwig committed Dec 21, 2016
1 parent 6c73f94 commit 7c3a23b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/nvme/target/fcloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ fcloop_create_remote_port(struct device *dev, struct device_attribute *attr,
rport->lport = nport->lport;
nport->rport = rport;

return ret ? ret : count;
return count;
}


Expand Down Expand Up @@ -952,7 +952,7 @@ fcloop_create_target_port(struct device *dev, struct device_attribute *attr,
tport->lport = nport->lport;
nport->tport = tport;

return ret ? ret : count;
return count;
}


Expand Down

0 comments on commit 7c3a23b

Please sign in to comment.