Private
Public Access
2
0

uart.c: mraa_uart_get_dev_path return NULL on error

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Jon Trulson
2015-02-18 12:38:44 -07:00
committed by Brendan Le Foll
parent d6891e8bd7
commit dd807308ac

View File

@@ -100,11 +100,11 @@ mraa_uart_get_dev_path(mraa_uart_context dev)
{ {
if (dev == NULL) { if (dev == NULL) {
syslog(LOG_ERR, "uart: get_device_path failed, context is NULL"); syslog(LOG_ERR, "uart: get_device_path failed, context is NULL");
return "ERROR:CONTEXT_IS_NULL"; return NULL;
} }
if (dev->path == NULL) { if (dev->path == NULL) {
syslog(LOG_ERR, "uart: device path undefined"); syslog(LOG_ERR, "uart: device path undefined");
return "ERROR:PATH_NOT_SET"; return NULL;
} }
return dev->path; return dev->path;
} }