mctp: Fix warnings reported by clang-analyzer
authorMatt Johnston <matt@codeconstruct.com.au>
Tue, 22 Feb 2022 04:29:36 +0000 (12:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Feb 2022 12:31:39 +0000 (12:31 +0000)
commit8d783197f06d905e5e7a89342e815ef5aeaa1731
tree8f093e440b51bf03fc18986be3baf7b590f99150
parent3185485cfaa0206000bd5e74a2ebb734e02fa246
mctp: Fix warnings reported by clang-analyzer

net/mctp/device.c:140:11: warning: Assigned value is garbage or undefined
[clang-analyzer-core.uninitialized.Assign]
        mcb->idx = idx;

- Not a real problem due to how the callback runs, fix the warning.

net/mctp/route.c:458:4: warning: Value stored to 'msk' is never read
[clang-analyzer-deadcode.DeadStores]
        msk = container_of(key->sk, struct mctp_sock, sk);

- 'msk' dead assignment can be removed here.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mctp/device.c
net/mctp/route.c