diff --git a/arch/arm/src/cxd56xx/cxd56_adc.c b/arch/arm/src/cxd56xx/cxd56_adc.c index 45a52985d42..ee49b5eebcd 100644 --- a/arch/arm/src/cxd56xx/cxd56_adc.c +++ b/arch/arm/src/cxd56xx/cxd56_adc.c @@ -869,7 +869,7 @@ static int cxd56_adc_ioctl(FAR struct file *filep, int cmd, else { aerr("Unrecognized cmd: %d\n", cmd); - ret = -EINVAL; + ret = -ENOTTY; } } break; diff --git a/arch/arm/src/stm32/stm32_hrtim.c b/arch/arm/src/stm32/stm32_hrtim.c index 198a1772afe..493bbddb3dd 100644 --- a/arch/arm/src/stm32/stm32_hrtim.c +++ b/arch/arm/src/stm32/stm32_hrtim.c @@ -1692,7 +1692,7 @@ static int stm32_hrtim_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { default: { - ret = -ENOSYS; + ret = -ENOTTY; break; } }