net: igmp: Fix uninitialized variable
The return value might be uninitialized if there was no suitable IPv4 address found for the network interface. Coverity-CID: 224630 Fixes #35158 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
76dee395d8
commit
f602801f91
|
@ -120,7 +120,7 @@ static int send_igmp_report(struct net_if *iface,
|
|||
struct net_if_ipv4 *ipv4 = iface->config.ip.ipv4;
|
||||
struct net_pkt *pkt = NULL;
|
||||
int i, count = 0;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (!ipv4) {
|
||||
return -ENOENT;
|
||||
|
|
Loading…
Reference in a new issue