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-Url: https://git.stricted.de/?a=commitdiff_plain;h=bc49b92671632d09a0fa6651c4fdf2b9ab0632ee;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 f5f3052e32bf..a71f29d5ca04 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: