Skip to content

Commit

Permalink
Staging: hv: netvsc: Cleanup error return values in rndis_filter_set_…
Browse files Browse the repository at this point in the history
…packet_filter()

Use standard Linux error codes and cleanup some error paths.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Aug 25, 2011
1 parent de6e058 commit 58ef397
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/staging/hv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev,
RNDIS_MESSAGE_SIZE(struct rndis_set_request) +
sizeof(u32));
if (!request) {
ret = -1;
ret = -ENOMEM;
goto Cleanup;
}

Expand All @@ -531,7 +531,6 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev,
t = wait_for_completion_timeout(&request->wait_event, 5*HZ);

if (t == 0) {
ret = -1;
dev_err(&dev->net_dev->dev->device,
"timeout before we got a set response...\n");
/*
Expand All @@ -540,8 +539,6 @@ static int rndis_filter_set_packet_filter(struct rndis_device *dev,
*/
goto Exit;
} else {
if (ret > 0)
ret = 0;
set_complete = &request->response_msg.msg.set_complete;
status = set_complete->status;
}
Expand Down

0 comments on commit 58ef397

Please sign in to comment.