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

Commit 5243e7bd authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller
Browse files

hyperv: Add error handling to rndis_filter_device_add()

parent fa85a6c2
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -804,18 +804,15 @@ int rndis_filter_device_add(struct hv_device *dev,
	/* Send the rndis initialization message */
	ret = rndis_filter_init_device(rndis_device);
	if (ret != 0) {
		/*
		 * TODO: If rndis init failed, we will need to shut down the
		 * channel
		 */
		rndis_filter_device_remove(dev);
		return ret;
	}

	/* Get the mac address */
	ret = rndis_filter_query_device_mac(rndis_device);
	if (ret != 0) {
		/*
		 * TODO: shutdown rndis device and the channel
		 */
		rndis_filter_device_remove(dev);
		return ret;
	}

	memcpy(device_info->mac_adr, rndis_device->hw_mac_adr, ETH_ALEN);