summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-03-16 00:44:05 -0400
committerMan, Jianting (Meco) <[email protected]>2023-03-16 20:21:43 -0400
commitdfddd79b2453ab13d12b69c7db14e2f685175af7 (patch)
tree2f59da3e3389e54872609473f21c1904167822d8 /components
parente4e88b2f3eff319105a34ec7827c2ee135c9e8b7 (diff)
[errno code][-RT_EINVAL] fix that use RT_EINVAL without -
Diffstat (limited to 'components')
-rw-r--r--components/drivers/wlan/wlan_mgnt.c4
-rw-r--r--components/lwp/lwp_signal.c2
-rw-r--r--components/utilities/rt-link/src/rtlink_dev.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/components/drivers/wlan/wlan_mgnt.c b/components/drivers/wlan/wlan_mgnt.c
index 768d342069..27bd5623c8 100644
--- a/components/drivers/wlan/wlan_mgnt.c
+++ b/components/drivers/wlan/wlan_mgnt.c
@@ -1670,7 +1670,7 @@ rt_err_t rt_wlan_register_event_handler(rt_wlan_event_t event, rt_wlan_event_han
if (event >= RT_WLAN_EVT_MAX)
{
- return RT_EINVAL;
+ return -RT_EINVAL;
}
RT_WLAN_LOG_D("%s is run event:%d", __FUNCTION__, event);
@@ -1690,7 +1690,7 @@ rt_err_t rt_wlan_unregister_event_handler(rt_wlan_event_t event)
if (event >= RT_WLAN_EVT_MAX)
{
- return RT_EINVAL;
+ return -RT_EINVAL;
}
RT_WLAN_LOG_D("%s is run event:%d", __FUNCTION__, event);
MGNT_LOCK();
diff --git a/components/lwp/lwp_signal.c b/components/lwp/lwp_signal.c
index ccebec7d80..44a1083c57 100644
--- a/components/lwp/lwp_signal.c
+++ b/components/lwp/lwp_signal.c
@@ -455,7 +455,7 @@ int lwp_sigprocmask(int how, const lwp_sigset_t *sigset, lwp_sigset_t *oset)
newset = *sigset;
break;
default:
- ret = RT_EINVAL;
+ ret = -RT_EINVAL;
goto out;
}
diff --git a/components/utilities/rt-link/src/rtlink_dev.c b/components/utilities/rt-link/src/rtlink_dev.c
index 24c45585ea..85d19abd4c 100644
--- a/components/utilities/rt-link/src/rtlink_dev.c
+++ b/components/utilities/rt-link/src/rtlink_dev.c
@@ -321,7 +321,7 @@ rt_err_t rt_link_dev_control(rt_device_t dev, int cmd, void *args)
if (cmd & RT_DEVICE_CTRL_CONFIG)
{
if (args == RT_NULL)
- return RT_EINVAL;
+ return -RT_EINVAL;
RTLINK_SERV(dev).service = ((struct rt_link_service *)args)->service;
RTLINK_SERV(dev).timeout_tx = ((struct rt_link_service *)args)->timeout_tx;
RTLINK_SERV(dev).flag = ((struct rt_link_service *)args)->flag;