Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

llc2: Remove redundant assignment to rc

Variable rc is set to zero but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.

Cleans up the following clang-analyzer warning:

net/llc/llc_station.c:86:2: warning: Value stored to 'rc' is never read
[clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiapeng Chong and committed by
David S. Miller
2342eb1a 3afef8c7

-2
-2
net/llc/llc_station.c
··· 54 54 55 55 if (!nskb) 56 56 goto out; 57 - rc = 0; 58 57 llc_pdu_decode_sa(skb, mac_da); 59 58 llc_pdu_decode_ssap(skb, &dsap); 60 59 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); ··· 82 83 83 84 if (!nskb) 84 85 goto out; 85 - rc = 0; 86 86 llc_pdu_decode_sa(skb, mac_da); 87 87 llc_pdu_decode_ssap(skb, &dsap); 88 88 llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);