The UT32x driver requires a user spec for the connection. The device
cannot get identified, that's why successful open/close for the port
will suffice. Lack of an input spec as well as failure in the early
scan phase will terminate the scan routine early.
When we reach the end of the scan which creates the device instance
and registers it with the list of found devices, the port already
is closed and the list of devices will never be empty. Remove the
redundant close call and the dead branch which frees the serial port.
}
devices = g_slist_append(devices, sdi);
- serial_close(serial);
- if (!devices)
- sr_serial_dev_inst_free(serial);
-
return std_scan_complete(di, devices);
}