fs/driver/mtd: Check invaid param in mtdconfig_ioctl function.
If param is NUll, error value EINVAL should return,
otherwise it will cause crash.
@@ -1160,6 +1160,9 @@ static int mtdconfig_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
FAR struct mtdconfig_struct_s *dev = inode->i_private;
FAR struct config_data_s *pdata;
int ret = -ENOSYS;
+ if (!arg) {
+ return -EINVAL;
+ }
switch (cmd) {
case CFGDIOC_SETCONFIG:
