summaryrefslogtreecommitdiff
path: root/net/mctp/device.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2022-02-22 07:29:36 +0300
committerDavid S. Miller <davem@davemloft.net>2022-02-23 15:31:39 +0300
commit8d783197f06d905e5e7a89342e815ef5aeaa1731 (patch)
tree8f093e440b51bf03fc18986be3baf7b590f99150 /net/mctp/device.c
parent3185485cfaa0206000bd5e74a2ebb734e02fa246 (diff)
downloadlinux-8d783197f06d905e5e7a89342e815ef5aeaa1731.tar.xz
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>
Diffstat (limited to 'net/mctp/device.c')
-rw-r--r--net/mctp/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mctp/device.c b/net/mctp/device.c
index b754c31162b1..da13444c632b 100644
--- a/net/mctp/device.c
+++ b/net/mctp/device.c
@@ -120,7 +120,7 @@ static int mctp_dump_addrinfo(struct sk_buff *skb, struct netlink_callback *cb)
struct ifaddrmsg *hdr;
struct mctp_dev *mdev;
int ifindex;
- int idx, rc;
+ int idx = 0, rc;
hdr = nlmsg_data(cb->nlh);
// filter by ifindex if requested