sysclk-lwla: Close USB handle on drain error

This commit is contained in:
Daniel Elstner 2015-12-05 10:41:16 +01:00
parent 407b6e2cff
commit fc6cbfce2b
1 changed files with 3 additions and 1 deletions

View File

@ -325,8 +325,10 @@ static int dev_open(struct sr_dev_inst *sdi)
}
ret = drain_usb(usb, EP_REPLY);
if (ret != SR_OK)
if (ret != SR_OK) {
sr_usb_close(usb);
return ret;
}
sdi->status = SR_ST_ACTIVE;