aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/device/lms/LMSDevice.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-04 12:42:30 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-12-04 15:57:37 +0000
commited361f9912936ce97a372b249059bc436b530976 (patch)
tree0f4312c553df4df6c42cd428f18b29cfbb3dabe0 /Transceiver52M/device/lms/LMSDevice.cpp
parent2d085e290bbe0ebf1b666aab4d4e0af9c17c1a58 (diff)
lms: Close device on LMS_Init failure
Diffstat (limited to 'Transceiver52M/device/lms/LMSDevice.cpp')
-rw-r--r--Transceiver52M/device/lms/LMSDevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 144f75d..712652a 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -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))