bsp/qemu-aarch64: validate RTC control args

This commit is contained in:
Aphlita 2026-05-07 15:43:19 +08:00 committed by Rbb666
parent 5890ecee59
commit e994162dbf
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ static rt_err_t pl031_rtc_control(rt_device_t dev, int cmd, void *args)
RT_ASSERT(dev != RT_NULL);
if (args == RT_NULL)
{
return -RT_EINVAL;
}
switch (cmd)
{
case RT_DEVICE_CTRL_RTC_GET_TIME: