]> asedeno.scripts.mit.edu Git - linux.git/commit
IB/core: remove redundant check on prot_sg_cnt
authorColin Ian King <colin.king@canonical.com>
Mon, 9 Oct 2017 16:12:00 +0000 (17:12 +0100)
committerDoug Ledford <dledford@redhat.com>
Tue, 10 Oct 2017 14:49:45 +0000 (10:49 -0400)
commit318a8ab7e87887946084a7c0398ecc978c6aa71d
tree39d9d69fbecd03023dbc676208000dd5fadc256a
parent9d18717790c43c904fabe9da7a4c6b2ebed2c4d8
IB/core: remove redundant check on prot_sg_cnt

prot_sg_cnt cannot be zero as a previous check on ret (from which
prot_sg_cnt is assigned) returns -ENOMEM if is it zero.  Since
it cannot be zero we can simplify the code by removing the non
-zero check on prot_sg_cnt and redundant else statement.

Detected by CoverityScan, COD#1357188 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/rw.c