From b3627107782d73d97727ab9b7d5d1544fb832a73 Mon Sep 17 00:00:00 2001 From: Sergey Kostanbaev Date: Fri, 25 Dec 2015 20:47:12 +0300 Subject: [PATCH] throw exception if incorrect DCDC version were provided --- host/umtrx_impl.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/host/umtrx_impl.cpp b/host/umtrx_impl.cpp index d0a8dd820..c25b12d15 100644 --- a/host/umtrx_impl.cpp +++ b/host/umtrx_impl.cpp @@ -304,15 +304,8 @@ umtrx_impl::umtrx_impl(const device_addr_t &device_addr) { detect_hw_dcdc_ver(mb_path); } else { - if (_hw_dcdc_ver >= DCDC_VER_COUNT) - { - UHD_MSG(status) << "Unknown UmTRX DCDC version " << _hw_dcdc_ver << std::endl; - _hw_dcdc_ver = DCDC_VER_2_3_1_OLD; - } - if (_hw_dcdc_ver != DCDC_VER_2_3_1_OLD) - { - UHD_MSG(status) << "Using DCDC version " << _hw_dcdc_ver << std::endl; - } + UHD_ASSERT_THROW(_hw_dcdc_ver < DCDC_VER_COUNT); + UHD_MSG(status) << "Using DCDC version " << _hw_dcdc_ver << std::endl; } _tree->create(mb_path / "hwdcdc_ver").set(_hw_dcdc_ver);