Re: [PATCH] IB/core: remove redundant check on prot_sg_cnt

From: Doug Ledford
Date: Mon Oct 09 2017 - 13:12:38 EST


On Mon, 2017-10-09 at 17:12 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>

Thanks, applied.

--
Doug Ledford <dledford@xxxxxxxxxx>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD