@@ -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: