summaryrefslogtreecommitdiff
path: root/drivers/staging/hv
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2010-05-05 15:27:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 11:36:15 -0700
commit790696847dfad8b2d968ce82cc1be58ebacefead (patch)
treebe2f394f2e2c78877c0531d6d3eed98c1d0f8312 /drivers/staging/hv
parent7a09876d2a68aab6c7a7d9df60eb0eb13467af11 (diff)
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>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r--drivers/staging/hv/NetVsc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index ddde39136b6e..f852984950a8 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -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); */