Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
人间散章
rt-thread
提交
156fda61
R
rt-thread
项目概览
人间散章
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
156fda61
编写于
3月 23, 2023
作者:
嵌入式路上的流浪
提交者:
mysterywolf
3月 23, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[errno code]fix that use RT_ENOMEM without -
上级
4ed9bc11
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
16 addition
and
16 deletion
+16
-16
bsp/at32/libraries/rt_drivers/drv_qspi.c
bsp/at32/libraries/rt_drivers/drv_qspi.c
+2
-2
bsp/ft2004/drivers/drv_qspi.c
bsp/ft2004/drivers/drv_qspi.c
+1
-1
bsp/ft2004/drivers/drv_sdctrl.c
bsp/ft2004/drivers/drv_sdctrl.c
+1
-1
bsp/loongson/ls1cdev/drivers/touch.c
bsp/loongson/ls1cdev/drivers/touch.c
+1
-1
bsp/mini4020/drivers/sdcard.c
bsp/mini4020/drivers/sdcard.c
+3
-3
bsp/nrf5x/libraries/drivers/drv_gpio.c
bsp/nrf5x/libraries/drivers/drv_gpio.c
+2
-2
bsp/stm32/libraries/HAL_Drivers/drv_qspi.c
bsp/stm32/libraries/HAL_Drivers/drv_qspi.c
+1
-1
components/drivers/ipc/dataqueue.c
components/drivers/ipc/dataqueue.c
+1
-1
components/drivers/usb/usbhost/core/usbhost_core.c
components/drivers/usb/usbhost/core/usbhost_core.c
+2
-2
components/utilities/ymodem/ry_sy.c
components/utilities/ymodem/ry_sy.c
+2
-2
未找到文件。
bsp/at32/libraries/rt_drivers/drv_qspi.c
浏览文件 @
156fda61
...
@@ -444,14 +444,14 @@ rt_err_t at32_qspi_bus_attach_device(const char *bus_name, const char *device_na
...
@@ -444,14 +444,14 @@ rt_err_t at32_qspi_bus_attach_device(const char *bus_name, const char *device_na
if
(
qspi_device
==
RT_NULL
)
if
(
qspi_device
==
RT_NULL
)
{
{
LOG_E
(
"no memory, qspi bus attach device failed!"
);
LOG_E
(
"no memory, qspi bus attach device failed!"
);
result
=
RT_ENOMEM
;
result
=
-
RT_ENOMEM
;
goto
__exit
;
goto
__exit
;
}
}
cs_pin
=
(
struct
at32_hw_spi_cs
*
)
rt_malloc
(
sizeof
(
struct
at32_hw_spi_cs
));
cs_pin
=
(
struct
at32_hw_spi_cs
*
)
rt_malloc
(
sizeof
(
struct
at32_hw_spi_cs
));
if
(
qspi_device
==
RT_NULL
)
if
(
qspi_device
==
RT_NULL
)
{
{
LOG_E
(
"no memory, qspi bus attach device failed!"
);
LOG_E
(
"no memory, qspi bus attach device failed!"
);
result
=
RT_ENOMEM
;
result
=
-
RT_ENOMEM
;
goto
__exit
;
goto
__exit
;
}
}
...
...
bsp/ft2004/drivers/drv_qspi.c
浏览文件 @
156fda61
...
@@ -288,7 +288,7 @@ rt_err_t ft2004_qspi_bus_attach_device(const char *bus_name, const char *device_
...
@@ -288,7 +288,7 @@ rt_err_t ft2004_qspi_bus_attach_device(const char *bus_name, const char *device_
if
(
qspi_device
==
RT_NULL
)
if
(
qspi_device
==
RT_NULL
)
{
{
LOG_E
(
"no memory, qspi bus attach device failed!"
);
LOG_E
(
"no memory, qspi bus attach device failed!"
);
result
=
RT_ENOMEM
;
result
=
-
RT_ENOMEM
;
goto
__exit
;
goto
__exit
;
}
}
...
...
bsp/ft2004/drivers/drv_sdctrl.c
浏览文件 @
156fda61
...
@@ -555,7 +555,7 @@ static rt_err_t rthw_sdctrl_create(ft_sdctrl_class_t *class_p)
...
@@ -555,7 +555,7 @@ static rt_err_t rthw_sdctrl_create(ft_sdctrl_class_t *class_p)
if
(
host
==
RT_NULL
)
if
(
host
==
RT_NULL
)
{
{
LOG_E
(
"L:%d F:%s mmcsd alloc host fail"
);
LOG_E
(
"L:%d F:%s mmcsd alloc host fail"
);
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
class_p
->
ft_sdctrl
.
config
=
*
(
FSdCtrl_Config_t
*
)
FSdCtrl_LookupConfig
(
0
);
class_p
->
ft_sdctrl
.
config
=
*
(
FSdCtrl_Config_t
*
)
FSdCtrl_LookupConfig
(
0
);
...
...
bsp/loongson/ls1cdev/drivers/touch.c
浏览文件 @
156fda61
...
@@ -561,7 +561,7 @@ rt_err_t rtgui_touch_hw_init(const char * spi_device_name)
...
@@ -561,7 +561,7 @@ rt_err_t rtgui_touch_hw_init(const char * spi_device_name)
}
}
touch
=
(
struct
rtgui_touch_device
*
)
rt_malloc
(
sizeof
(
struct
rtgui_touch_device
));
touch
=
(
struct
rtgui_touch_device
*
)
rt_malloc
(
sizeof
(
struct
rtgui_touch_device
));
if
(
touch
==
RT_NULL
)
return
RT_ENOMEM
;
/* no memory yet */
if
(
touch
==
RT_NULL
)
return
-
RT_ENOMEM
;
/* no memory yet */
/* clear device structure */
/* clear device structure */
rt_memset
(
&
(
touch
->
parent
),
0
,
sizeof
(
struct
rt_device
));
rt_memset
(
&
(
touch
->
parent
),
0
,
sizeof
(
struct
rt_device
));
...
...
bsp/mini4020/drivers/sdcard.c
浏览文件 @
156fda61
...
@@ -662,7 +662,7 @@ rt_err_t rt_hw_sdcard_init()
...
@@ -662,7 +662,7 @@ rt_err_t rt_hw_sdcard_init()
if
(
ptr_sddev
==
RT_NULL
)
if
(
ptr_sddev
==
RT_NULL
)
{
{
EOUT
(
"Failed to allocate sdcard device structure
\n
"
);
EOUT
(
"Failed to allocate sdcard device structure
\n
"
);
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
/*sdcard intialize*/
/*sdcard intialize*/
...
@@ -689,7 +689,7 @@ rt_err_t rt_hw_sdcard_init()
...
@@ -689,7 +689,7 @@ rt_err_t rt_hw_sdcard_init()
if
(
ptr_sddev
->
part
==
RT_NULL
)
if
(
ptr_sddev
->
part
==
RT_NULL
)
{
{
EOUT
(
"allocate partition failed
\n
"
);
EOUT
(
"allocate partition failed
\n
"
);
err
=
RT_ENOMEM
;
err
=
-
RT_ENOMEM
;
goto
FAIL2
;
goto
FAIL2
;
}
}
...
@@ -698,7 +698,7 @@ rt_err_t rt_hw_sdcard_init()
...
@@ -698,7 +698,7 @@ rt_err_t rt_hw_sdcard_init()
if
(
ptr_sddev
->
device
==
RT_NULL
)
if
(
ptr_sddev
->
device
==
RT_NULL
)
{
{
EOUT
(
"allocate device failed
\n
"
);
EOUT
(
"allocate device failed
\n
"
);
err
=
RT_ENOMEM
;
err
=
-
RT_ENOMEM
;
goto
FAIL1
;
goto
FAIL1
;
}
}
...
...
bsp/nrf5x/libraries/drivers/drv_gpio.c
浏览文件 @
156fda61
...
@@ -225,7 +225,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -225,7 +225,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
}
}
if
(
irqindex
==
-
1
)
if
(
irqindex
==
-
1
)
{
{
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
level
=
rt_hw_interrupt_disable
();
level
=
rt_hw_interrupt_disable
();
...
@@ -264,7 +264,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
...
@@ -264,7 +264,7 @@ static rt_err_t nrf5x_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
case
NRFX_SUCCESS
:
case
NRFX_SUCCESS
:
return
RT_EOK
;
return
RT_EOK
;
case
NRFX_ERROR_NO_MEM
:
case
NRFX_ERROR_NO_MEM
:
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
default:
default:
return
-
RT_ERROR
;
return
-
RT_ERROR
;
}
}
...
...
bsp/stm32/libraries/HAL_Drivers/drv_qspi.c
浏览文件 @
156fda61
...
@@ -319,7 +319,7 @@ rt_err_t rt_hw_qspi_device_attach(const char *bus_name, const char *device_name,
...
@@ -319,7 +319,7 @@ rt_err_t rt_hw_qspi_device_attach(const char *bus_name, const char *device_name,
if
(
qspi_device
==
RT_NULL
)
if
(
qspi_device
==
RT_NULL
)
{
{
LOG_E
(
"no memory, qspi bus attach device failed!"
);
LOG_E
(
"no memory, qspi bus attach device failed!"
);
result
=
RT_ENOMEM
;
result
=
-
RT_ENOMEM
;
goto
__exit
;
goto
__exit
;
}
}
...
...
components/drivers/ipc/dataqueue.c
浏览文件 @
156fda61
...
@@ -36,7 +36,7 @@ struct rt_data_item
...
@@ -36,7 +36,7 @@ struct rt_data_item
* @param evt_notify is the notification callback function.
* @param evt_notify is the notification callback function.
*
*
* @return Return the operation status. When the return value is RT_EOK, the initialization is successful.
* @return Return the operation status. When the return value is RT_EOK, the initialization is successful.
* When the return value is RT_ENOMEM, it means insufficient memory allocation failed.
* When the return value is
-
RT_ENOMEM, it means insufficient memory allocation failed.
*/
*/
rt_err_t
rt_err_t
rt_data_queue_init
(
struct
rt_data_queue
*
queue
,
rt_data_queue_init
(
struct
rt_data_queue
*
queue
,
...
...
components/drivers/usb/usbhost/core/usbhost_core.c
浏览文件 @
156fda61
...
@@ -164,7 +164,7 @@ rt_err_t rt_usbh_attatch_instance(uinst_t device)
...
@@ -164,7 +164,7 @@ rt_err_t rt_usbh_attatch_instance(uinst_t device)
device
->
cfg_desc
=
(
ucfg_desc_t
)
rt_malloc
(
cfg_desc
.
wTotalLength
);
device
->
cfg_desc
=
(
ucfg_desc_t
)
rt_malloc
(
cfg_desc
.
wTotalLength
);
if
(
device
->
cfg_desc
==
RT_NULL
)
if
(
device
->
cfg_desc
==
RT_NULL
)
{
{
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
rt_memset
(
device
->
cfg_desc
,
0
,
cfg_desc
.
wTotalLength
);
rt_memset
(
device
->
cfg_desc
,
0
,
cfg_desc
.
wTotalLength
);
...
@@ -225,7 +225,7 @@ rt_err_t rt_usbh_attatch_instance(uinst_t device)
...
@@ -225,7 +225,7 @@ rt_err_t rt_usbh_attatch_instance(uinst_t device)
device
->
intf
[
i
]
=
(
struct
uhintf
*
)
rt_malloc
(
sizeof
(
struct
uhintf
));
device
->
intf
[
i
]
=
(
struct
uhintf
*
)
rt_malloc
(
sizeof
(
struct
uhintf
));
if
(
device
->
intf
[
i
]
==
RT_NULL
)
if
(
device
->
intf
[
i
]
==
RT_NULL
)
{
{
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
device
->
intf
[
i
]
->
drv
=
drv
;
device
->
intf
[
i
]
->
drv
=
drv
;
device
->
intf
[
i
]
->
device
=
device
;
device
->
intf
[
i
]
->
device
=
device
;
...
...
components/utilities/ymodem/ry_sy.c
浏览文件 @
156fda61
...
@@ -199,7 +199,7 @@ static rt_err_t rym_download_file(rt_device_t idev,const char *file_path)
...
@@ -199,7 +199,7 @@ static rt_err_t rym_download_file(rt_device_t idev,const char *file_path)
if
(
!
ctx
)
if
(
!
ctx
)
{
{
rt_kprintf
(
"rt_malloc failed
\n
"
);
rt_kprintf
(
"rt_malloc failed
\n
"
);
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
ctx
->
fd
=
-
1
;
ctx
->
fd
=
-
1
;
rt_strncpy
(
ctx
->
fpath
,
file_path
,
DFS_PATH_MAX
);
rt_strncpy
(
ctx
->
fpath
,
file_path
,
DFS_PATH_MAX
);
...
@@ -219,7 +219,7 @@ static rt_err_t rym_upload_file(rt_device_t idev, const char *file_path)
...
@@ -219,7 +219,7 @@ static rt_err_t rym_upload_file(rt_device_t idev, const char *file_path)
if
(
!
ctx
)
if
(
!
ctx
)
{
{
rt_kprintf
(
"rt_malloc failed
\n
"
);
rt_kprintf
(
"rt_malloc failed
\n
"
);
return
RT_ENOMEM
;
return
-
RT_ENOMEM
;
}
}
ctx
->
fd
=
-
1
;
ctx
->
fd
=
-
1
;
rt_strncpy
(
ctx
->
fpath
,
file_path
,
DFS_PATH_MAX
);
rt_strncpy
(
ctx
->
fpath
,
file_path
,
DFS_PATH_MAX
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录