lms: Close device on LMS_Init failure

Change-Id: I0b307452a9e122a0ea39a46f096423c9a5293d30
This commit is contained in:
Pau Espin Pedrol
2018-12-04 12:42:30 +01:00
parent 2d085e290b
commit ed361f9912

View File

@@ -135,7 +135,7 @@ int LMSDevice::open(const std::string &args, int ref, bool swap_channels)
LOGC(DDEV, INFO) << "Init LMS device";
if (LMS_Init(m_lms_dev) != 0) {
LOGC(DDEV, ERROR) << "LMS_Init() failed";
return -1;
goto out_close;
}
if (LMS_GetSampleRateRange(m_lms_dev, LMS_CH_RX, &range_sr))