mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Squashed commit of the following:
configs/z80sim and xtrs: Serial driver lower halfs ioctl methods should return a negated errno value, not set the errno variable.
drivers/wireless: CC1101 driver not permitted to set errno.
drivers/sensors: LIS331DL driver not permitted to set errno.
drivers/lcd: ILI9341 initialize method not permitted to set errno,
drivers/serial: 16550 UART driver IOCTL method must not set errno; it must return a negated errno value.
This commit is contained in:
@@ -215,8 +215,7 @@ static void up_detach(FAR struct uart_dev_s *dev)
|
||||
|
||||
static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
*get_errno_ptr() = ENOTTY;
|
||||
return ERROR;
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user