mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-20 21:37:22 +08:00
commit
55c3182b78
@ -430,10 +430,12 @@ int rt_hw_sensor_register(rt_sensor_t sensor,
|
||||
result = rt_device_register(device, device_name, flag | RT_DEVICE_FLAG_STANDALONE);
|
||||
if (result != RT_EOK)
|
||||
{
|
||||
rt_free(device_name);
|
||||
LOG_E("rt_sensor register err code: %d", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
rt_free(device_name);
|
||||
LOG_I("rt_sensor init success");
|
||||
return RT_EOK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user