rigol-ds: Don't close SCPI handle we didn't open.

This commit is contained in:
Bert Vermeulen 2014-03-27 15:13:24 +01:00
parent 5d336f1130
commit 0bcfc9dcd8
1 changed files with 0 additions and 6 deletions

View File

@ -273,8 +273,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
sr_info("Couldn't get IDN response.");
sr_scpi_close(scpi);
sr_scpi_free(scpi);
return NULL;
}
@ -292,13 +290,9 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
model->name,
hw_info->firmware_version))) {
sr_scpi_hw_info_free(hw_info);
sr_scpi_close(scpi);
sr_scpi_free(scpi);
return NULL;
}
sr_scpi_close(scpi);
sdi->conn = scpi;
sdi->driver = di;