mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
Merge pull request #21904 from Stopkaa/drivers/mrf24j40
drivers/mrf24j40: replace && with || in TX power validation
This commit is contained in:
commit
47ecbc14a2
@ -254,7 +254,7 @@ static int _config_phy(ieee802154_dev_t *hal, const ieee802154_phy_conf_t *conf)
|
||||
mrf24j40_t *dev = hal->priv;
|
||||
int8_t pow = conf->pow;
|
||||
uint8_t channel = conf->channel;
|
||||
if (pow < MRF24J40_MIN_TXPOWER && pow > MRF24J40_MAX_TXPOWER) {
|
||||
if (pow < MRF24J40_MIN_TXPOWER || pow > MRF24J40_MAX_TXPOWER) {
|
||||
return -EINVAL;
|
||||
}
|
||||
mrf24j40_set_txpower(dev, pow);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user