From ed361f9912936ce97a372b249059bc436b530976 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 4 Dec 2018 12:42:30 +0100 Subject: lms: Close device on LMS_Init failure Change-Id: I0b307452a9e122a0ea39a46f096423c9a5293d30 --- Transceiver52M/device/lms/LMSDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3