[PATCH] SUNRPC: svc_register error overwritten in next iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The break is in the inner loop, the svc_register() error is overwritten
in the next iteration. Only the error in the last iteration is returned.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
 net/sunrpc/svc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Is this needed?

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 08e05a8..5fd08c0 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -889,6 +889,8 @@ int svc_register(const struct svc_serv *serv, const int family,
 			if (error < 0)
 				break;
 		}
+		if (error < 0)
+			break;
 	}
 
 	return error;
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux