mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
[fix][device] 修正使用rt_device_create创建设备,使用rt_device_destroy删除失败的问题
This commit is contained in:
@@ -163,7 +163,7 @@ void rt_device_destroy(rt_device_t dev)
|
||||
{
|
||||
/* parameter check */
|
||||
RT_ASSERT(dev != RT_NULL);
|
||||
RT_ASSERT(rt_object_get_type(&dev->parent) == RT_Object_Class_Device);
|
||||
RT_ASSERT(rt_object_get_type(&dev->parent) == RT_Object_Class_Null);
|
||||
RT_ASSERT(rt_object_is_systemobject(&dev->parent) == RT_FALSE);
|
||||
|
||||
rt_object_detach(&(dev->parent));
|
||||
|
||||
Reference in New Issue
Block a user