uwrq is an unsigned 32-bit integer, it cannot be less than zero.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
- if (*uwrq < BEACON_LOST_COUNT_MIN || *uwrq > BEACON_LOST_COUNT_MAX)
+ if (*uwrq > BEACON_LOST_COUNT_MAX)
return -EINVAL;
priv->reg.beacon_lost_count = *uwrq;
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
- if (*uwrq < 0 || *uwrq > 0xFF)
+ if (*uwrq > 0xFF)
return -EINVAL;
priv->gain.tx_gain = (uint8_t)*uwrq;
if (priv->sleep_mode == SLP_SLEEP)
return -EPERM;
/* for SLEEP MODE */
- if (*uwrq < 0 || *uwrq > 0xFF)
+ if (*uwrq > 0xFF)
return -EINVAL;
priv->gain.rx_gain = (uint8_t)*uwrq;