[lldp-devel] [PATCH 6/6] ecp22 change module_notification return code

Thomas Richter tmricht at linux.vnet.ibm.com
Tue Feb 5 16:25:01 UTC 2013


Return 0 on success and errno on error.
The most common error is -ENOENT when the interface
is not found in the interface list of the module.

Signed-off-by: Thomas Richter <tmricht at linux.vnet.ibm.com>
---
 qbg/lldp_ecp22.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qbg/lldp_ecp22.c b/qbg/lldp_ecp22.c
index 96dab31..3341cc6 100644
--- a/qbg/lldp_ecp22.c
+++ b/qbg/lldp_ecp22.c
@@ -859,9 +859,9 @@ static int data_from_evb(char *ifname, struct evb22_to_ecp22 *ptr)
 	if (ecp) {
 		ecp->max_rte = ptr->max_rte;
 		ecp->max_retries = ptr->max_retry;
-		return 1;
+		return 0;
 	}
-	return 0;
+	return -ENOENT;
 }
 
 /*
-- 
1.7.1



More information about the lldp-devel mailing list