Skip to content

Commit 27ceb0e

Browse files
committed
drivers/mrf24j40: replace && with || in TX power validation
1 parent 42283c4 commit 27ceb0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mrf24j40/mrf24j40_radio_hal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static int _config_phy(ieee802154_dev_t *hal, const ieee802154_phy_conf_t *conf)
254254
mrf24j40_t *dev = hal->priv;
255255
int8_t pow = conf->pow;
256256
uint8_t channel = conf->channel;
257-
if (pow < MRF24J40_MIN_TXPOWER && pow > MRF24J40_MAX_TXPOWER) {
257+
if (pow < MRF24J40_MIN_TXPOWER || pow > MRF24J40_MAX_TXPOWER) {
258258
return -EINVAL;
259259
}
260260
mrf24j40_set_txpower(dev, pow);

0 commit comments

Comments
 (0)