mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Always return status from ftdi_open when called
Using dc_serial_open as a fallback to ftdi_open is just wrong, and will never work, just mask the real error and introduce read herrings. Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
4b42dcc6af
commit
1da9235cdf
1 changed files with 2 additions and 5 deletions
|
@ -1328,11 +1328,8 @@ dc_status_t divecomputer_device_open(device_data_t *data)
|
||||||
|
|
||||||
if (transports & DC_TRANSPORT_SERIAL) {
|
if (transports & DC_TRANSPORT_SERIAL) {
|
||||||
#ifdef SERIAL_FTDI
|
#ifdef SERIAL_FTDI
|
||||||
if (!strcmp(data->devname, "ftdi")) {
|
if (!strcmp(data->devname, "ftdi"))
|
||||||
rc = ftdi_open(&data->iostream, context);
|
return ftdi_open(&data->iostream, context);
|
||||||
if (rc == DC_STATUS_SUCCESS)
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
rc = dc_serial_open(&data->iostream, context, data->devname);
|
rc = dc_serial_open(&data->iostream, context, data->devname);
|
||||||
if (rc == DC_STATUS_SUCCESS)
|
if (rc == DC_STATUS_SUCCESS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue