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

Commit 8a62d716 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

staging: hv: remove ASSERT()s in RndisFilter.c



return -EINVAL instead of calling ASSERT() for these conditionals.

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 45e44314
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -391,7 +391,9 @@ static int RndisFilterOnReceive(struct hv_device *Device,


	DPRINT_ENTER(NETVSC);
	DPRINT_ENTER(NETVSC);


	ASSERT(netDevice);
	if (!netDevice)
		return -EINVAL;

	/* Make sure the rndis device state is initialized */
	/* Make sure the rndis device state is initialized */
	if (!netDevice->Extension) {
	if (!netDevice->Extension) {
		DPRINT_ERR(NETVSC, "got rndis message but no rndis device..."
		DPRINT_ERR(NETVSC, "got rndis message but no rndis device..."
@@ -492,7 +494,8 @@ static int RndisFilterQueryDevice(struct rndis_device *Device, u32 Oid,


	DPRINT_ENTER(NETVSC);
	DPRINT_ENTER(NETVSC);


	ASSERT(Result);
	if (!Result)
		return -EINVAL;


	*ResultSize = 0;
	*ResultSize = 0;
	request = GetRndisRequest(Device, REMOTE_NDIS_QUERY_MSG,
	request = GetRndisRequest(Device, REMOTE_NDIS_QUERY_MSG,
@@ -885,7 +888,9 @@ int RndisFilterOnOpen(struct hv_device *Device)


	DPRINT_ENTER(NETVSC);
	DPRINT_ENTER(NETVSC);


	ASSERT(netDevice);
	if (!netDevice)
		return -EINVAL;

	ret = RndisFilterOpenDevice(netDevice->Extension);
	ret = RndisFilterOpenDevice(netDevice->Extension);


	DPRINT_EXIT(NETVSC);
	DPRINT_EXIT(NETVSC);
@@ -900,7 +905,9 @@ int RndisFilterOnClose(struct hv_device *Device)


	DPRINT_ENTER(NETVSC);
	DPRINT_ENTER(NETVSC);


	ASSERT(netDevice);
	if (!netDevice)
		return -EINVAL;

	ret = RndisFilterCloseDevice(netDevice->Extension);
	ret = RndisFilterCloseDevice(netDevice->Extension);


	DPRINT_EXIT(NETVSC);
	DPRINT_EXIT(NETVSC);