From 4a16b1826cafc353fa90826cbd4416476f1ea682 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 31 Jul 2012 23:45:21 +0000 Subject: LPC17xx serial now supports minimal termios ioctls; serial driver ioctl methods should not set errno variable git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4994 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/calypso/calypso_serial.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'nuttx/arch/arm/src/calypso/calypso_serial.c') diff --git a/nuttx/arch/arm/src/calypso/calypso_serial.c b/nuttx/arch/arm/src/calypso/calypso_serial.c index 69fe26a79..5175d25bb 100644 --- a/nuttx/arch/arm/src/calypso/calypso_serial.c +++ b/nuttx/arch/arm/src/calypso/calypso_serial.c @@ -712,8 +712,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 { @@ -740,8 +739,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) break; default: - *get_errno_ptr() = ENOTTY; - ret = ERROR; + ret = -ENOTTY; break; } -- cgit v1.2.3