summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/lpc214x/lpc214x_serial.c')
-rw-r--r--nuttx/arch/arm/src/lpc214x/lpc214x_serial.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
index bf7c1ec34..691adfa75 100644
--- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
+++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
@@ -574,8 +574,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
struct up_dev_s *user = (struct up_dev_s*)arg;
if (!user)
{
- *get_errno_ptr() = EINVAL;
- ret = ERROR;
+ ret = -EINVAL;
}
else
{
@@ -602,8 +601,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
break;
default:
- *get_errno_ptr() = ENOTTY;
- ret = ERROR;
+ ret = -ENOTTY;
break;
}