drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2020-06-05 10:34:01 +09:00 committed by Xiang Xiao
parent ef30832e67
commit 4b9886fa29
6 changed files with 18 additions and 6 deletions

View File

@ -737,6 +737,7 @@ static int null_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@ -771,11 +772,12 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
ret = -ENOTTY;
break;
}
audinfo("Return OK\n");
return OK;
return ret;
}
/****************************************************************************

View File

@ -1449,6 +1449,7 @@ static int cs43l22_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
static int cs43l22_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@ -1486,11 +1487,12 @@ static int cs43l22_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
ret = -ENOTTY;
audinfo("Ignored\n");
break;
}
return OK;
return ret;
}
/****************************************************************************

View File

@ -3307,6 +3307,7 @@ static int cxd56_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@ -3329,11 +3330,12 @@ static int cxd56_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
#endif
default:
ret = -ENOTTY;
audinfo("Unhandled ioctl: %d\n", cmd);
break;
}
return OK;
return ret;
}
/****************************************************************************

View File

@ -1716,6 +1716,7 @@ static int vs1053_cancelbuffer(FAR struct audio_lowerhalf_s *lower,
static int vs1053_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@ -1744,10 +1745,11 @@ static int vs1053_ioctl(FAR struct audio_lowerhalf_s *lower, int cmd,
#endif
default:
ret = -ENOTTY;
break;
}
return OK;
return ret;
}
/****************************************************************************

View File

@ -988,6 +988,7 @@ static int wm8776_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
static int wm8776_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@ -1025,11 +1026,12 @@ static int wm8776_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
ret = -ENOTTY;
audinfo("Ignored\n");
break;
}
return OK;
return ret;
}
/****************************************************************************

View File

@ -1832,6 +1832,7 @@ static int wm8904_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
unsigned long arg)
{
int ret = OK;
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
FAR struct ap_buffer_info_s *bufinfo;
#endif
@ -1869,11 +1870,12 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
#endif
default:
ret = -ENOTTY;
audinfo("Ignored\n");
break;
}
return OK;
return ret;
}
/****************************************************************************