[qca-nss-drv] Fix proc return values
Fix proc return values, so sysctl can have proper userspace errors
CRs-fixed: 836854
Change-Id: I5103f1a6d3e97b55fdad3550270c08a8acaffe88
Signed-off-by: Thomas Wu <wthomas@codeaurora.org>
diff --git a/nss_ipv4.c b/nss_ipv4.c
index 080d42d..f12ad69 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -389,7 +389,7 @@
}
up(&i4cfgp.sem);
- return NSS_SUCCESS;
+ return 0;
failure:
/*
@@ -397,7 +397,7 @@
*/
nss_ipv4_conn_cfg = i4cfgp.current_value;
up(&i4cfgp.sem);
- return NSS_FAILURE;
+ return -EINVAL;
}
static ctl_table nss_ipv4_table[] = {
diff --git a/nss_ipv6.c b/nss_ipv6.c
index 3257624..d46e4f7 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -390,7 +390,7 @@
}
up(&i6cfgp.sem);
- return NSS_SUCCESS;
+ return 0;
failure:
/*
@@ -398,7 +398,7 @@
*/
nss_ipv6_conn_cfg = i6cfgp.current_value;
up(&i6cfgp.sem);
- return NSS_FAILURE;
+ return -EINVAL;
}
static ctl_table nss_ipv6_table[] = {
diff --git a/nss_n2h.c b/nss_n2h.c
index d378ac8..ca87dbd 100755
--- a/nss_n2h.c
+++ b/nss_n2h.c
@@ -321,7 +321,7 @@
}
up(&nss_n2h_nepbcfgp[core_num].sem);
- return NSS_SUCCESS;
+ return 0;
failure:
/*
@@ -329,7 +329,7 @@
*/
*new_val = nss_n2h_nepbcfgp[core_num].current_value;
up(&nss_n2h_nepbcfgp[core_num].sem);
- return NSS_FAILURE;
+ return -EINVAL;
}
/*