commit | 0f94319ee8854ee65f30e2985a7f3f1b93256811 | [log] [tgz] |
---|---|---|
author | Yumi Yukimura <me.cafebabe@gmail.com> | Sun Jun 02 19:50:39 2024 +0800 |
committer | Yumi Yukimura <me.cafebabe@gmail.com> | Sun Jun 02 19:53:16 2024 +0800 |
tree | 2c52f3910c8912934133cad2679bbfe290cbd7c7 | |
parent | 329cea518d14990583ff7e54cfcb6ae998696a95 [diff] |
radio: config: 1.1-wrapper: Remove superfluous null check for radios[i] https://review.lineageos.org/c/LineageOS/android_hardware_lineage_interfaces/+/393102/comment/4a0bd32b_cbfc3c64/ Change-Id: I30436fbae3bebd6ab51df821b6f317488be1bd5d
diff --git a/radio/config/1.1-wrapper/RadioConfig.cpp b/radio/config/1.1-wrapper/RadioConfig.cpp index 582712e..b3f1674 100644 --- a/radio/config/1.1-wrapper/RadioConfig.cpp +++ b/radio/config/1.1-wrapper/RadioConfig.cpp
@@ -144,14 +144,7 @@ radioError = RadioError::INVALID_ARGUMENTS; } else { for (uint8_t i = 0; i < radios.size(); i++) { - auto radio = radios[i]; - if (radio == nullptr) { - LOG(ERROR) << __func__ << ": radios[" << std::to_string(i) << "] is null"; - radioError = RadioError::INTERNAL_ERR; - continue; - } - - radio->setDataAllowed(-1, i == modemId); + radios[i]->setDataAllowed(-1, i == modemId); } }