From: Bill Pemberton Date: Wed, 5 May 2010 19:27:56 +0000 (-0400) Subject: staging: hv: remove ASSERT() and return -EINVAL in NetVsc.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=790696847dfad8b2d968ce82cc1be58ebacefead;p=linux-beck.git staging: hv: remove ASSERT() and return -EINVAL in NetVsc.c return -EINVAL instead of calling ASSERT() Signed-off-by: Bill Pemberton Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- 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); */