Commit 79069684 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

staging: hv: remove ASSERT() and return -EINVAL in NetVsc.c

return -EINVAL instead of calling ASSERT()
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 7a09876d
......@@ -354,7 +354,11 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
DPRINT_EXIT(NETVSC);
return -1;
}
ASSERT(netDevice->SendBufferSize > 0);
if (netDevice->SendBufferSize <= 0) {
ret = -EINVAL;
goto Cleanup;
}
/* page-size grandularity */
/* ASSERT((netDevice->SendBufferSize & (PAGE_SIZE - 1)) == 0); */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment