Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 016c5d47 authored by Rohith Kollalsi's avatar Rohith Kollalsi
Browse files

net: usb: Initialize retval with zero as it might be used uninitialized



If at the start of usbnet_start_xmit function sk_buff is null then
there is a chance that retval could be used uninitialized. To avoid
such scenario initialize retval with zero.

Change-Id: I2d5b68075338f7d19b6bc76a4ce7cdbe422daadb
Signed-off-by: default avatarRohith Kollalsi <rkollals@codeaurora.org>
parent be1961a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1442,7 +1442,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
	struct skb_data		*entry;
	struct driver_info	*info = dev->driver_info;
	unsigned long		flags;
	int retval;
	int retval = 0;
	struct timespec64 now;

	if (skb)