From: K. Y. Srinivasan Date: Thu, 25 Aug 2011 16:49:20 +0000 (-0700) Subject: Staging: hv: netvsc: Cleanup error returns in rndis_filter_init_device() X-Git-Tag: v3.2-rc1~169^2^2~864^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc49b92671632d09a0fa6651c4fdf2b9ab0632ee;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git Staging: hv: netvsc: Cleanup error returns in rndis_filter_init_device() Use standard Linux error codes. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c index f5f3052..a71f29d 100644 --- a/drivers/staging/hv/rndis_filter.c +++ b/drivers/staging/hv/rndis_filter.c @@ -562,7 +562,7 @@ static int rndis_filter_init_device(struct rndis_device *dev) request = get_rndis_request(dev, REMOTE_NDIS_INITIALIZE_MSG, RNDIS_MESSAGE_SIZE(struct rndis_initialize_request)); if (!request) { - ret = -1; + ret = -ENOMEM; goto Cleanup; } @@ -596,7 +596,7 @@ static int rndis_filter_init_device(struct rndis_device *dev) ret = 0; } else { dev->state = RNDIS_DEV_UNINITIALIZED; - ret = -1; + ret = -EINVAL; } Cleanup: