mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
staging: hv: remove ASSERT() and return -EINVAL in NetVsc.c
return -EINVAL instead of calling ASSERT() Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7a09876d2a
commit
790696847d
@@ -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); */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user