Skip to content

Commit

Permalink
staging: hv: remove ASSERT() and return -EINVAL in NetVsc.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 7a09876 commit 7906968
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/staging/hv/NetVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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); */

Expand Down

0 comments on commit 7906968

Please sign in to comment.