bsp/qemu-aarch64: validate RTC control args
This commit is contained in:
parent
5890ecee59
commit
e994162dbf
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue