From 515107e3e0444baaf00102171a77907210854967 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 16 Mar 2016 06:31:48 -0600 Subject: [PATCH] apps/modbus/nuttx/portserial.c: Was not returning an error on failure to open the device driver. From Olololshka kokoko --- ChangeLog.txt | 6 +++++- modbus/nuttx/portserial.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index da18d86e8..d5784608e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1560,4 +1560,8 @@ (2016-02-23). * apps/platform/sabre-6quad: Add a platform directory for the Sabre 6Quad board (2016-03-01). - * apps/examples/ostest: Add a test of TLS (2016-03-11). \ No newline at end of file + * apps/examples/ostest: Add a test of TLS (2016-03-11). + * apps/modbus/nuttx/portserial.c: Was not returning an error + on failure to open the device driver. From Olololshka kokoko + (2016-03-16). + diff --git a/modbus/nuttx/portserial.c b/modbus/nuttx/portserial.c index 41ec19eeb..fcf3d088e 100644 --- a/modbus/nuttx/portserial.c +++ b/modbus/nuttx/portserial.c @@ -220,6 +220,7 @@ bool xMBPortSerialInit(uint8_t ucPort, speed_t ulBaudRate, { vMBPortLog(MB_LOG_ERROR, "SER-INIT", "Can't open serial port %s: %d\n", szDevice, errno); + bStatus = false; } #ifdef CONFIG_SERIAL_TERMIOS