aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-12-09 09:59:47 -0500
committerChristoph Hellwig <hch@lst.de>2016-12-21 05:34:28 -0500
commit7c3a23b85cac5f3caa531f369c1e3a5f1a8b555f (patch)
tree0a86c8d427acdebfd70f198751f0334c0a9ba656
parent6c73f949300f17851f53fa80c9d1611ccd6909d3 (diff)
nvmet/fcloop: remove some logically dead code performing redundant ret 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>
-rw-r--r--drivers/nvme/target/fcloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index bcb8ebeb01c5..4e8e6a22bce1 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -845,7 +845,7 @@ fcloop_create_remote_port(struct device *dev, struct device_attribute *attr,
845 rport->lport = nport->lport; 845 rport->lport = nport->lport;
846 nport->rport = rport; 846 nport->rport = rport;
847 847
848 return ret ? ret : count; 848 return count;
849} 849}
850 850
851 851
@@ -952,7 +952,7 @@ fcloop_create_target_port(struct device *dev, struct device_attribute *attr,
952 tport->lport = nport->lport; 952 tport->lport = nport->lport;
953 nport->tport = tport; 953 nport->tport = tport;
954 954
955 return ret ? ret : count; 955 return count;
956} 956}
957 957
958 958