Re: [PATCH] tcp: remove redundant check on tskb
From: Dan Carpenter
Date: Thu Apr 04 2019 - 11:06:00 EST
On Thu, Apr 04, 2019 at 03:46:03PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The non-null check on tskb is always false because it is in an else
> path of a check on tskb and hence tskb is null in this code block.
> This is check is therefore redundant and can be removed as well
> as the label coalesc.
>
> if (tsbk) {
> ...
> } else {
> ...
> if (unlikely(!skb)) {
> if (tskb) /* can never be true, redundant code */
> goto coalesc;
> return;
> }
> }
>
> Addresses-Coverity: ("Logically dead code")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
This was fallout from commit 75c119afe14f ("tcp: implement rb-tree based
retransmit queue").
regards,
dan carpenter