wireless: bcmdhd4361: fix overlapping comparisons
authorAnan Jaser <ananjaser@gmail.com>
Tue, 22 Sep 2020 20:33:22 +0000 (00:33 +0400)
committerAnan Jaser <ananjaser@gmail.com>
Tue, 22 Sep 2020 23:09:52 +0000 (03:09 +0400)
drivers/net/wireless/bcmdhd4361/wl_android.c:7107:22: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
        if ((adps_mode < 0) && (1 < adps_mode)) {

Change-Id: Ic52de37d5048341a0851b011463522b4865d119a

drivers/net/wireless/bcmdhd4361/wl_android.c

index 27ce4d5bf0d81937f264df28982a8410e7377e55..a63c1a0ec6155e9295c33b9864313e76ab11a3e9 100644 (file)
@@ -7104,7 +7104,7 @@ wl_android_set_adps_mode(struct net_device *dev, const char* string_num)
        adps_mode = bcm_atoi(string_num);
        WL_ERR(("%s: SET_ADPS %d\n", __FUNCTION__, adps_mode));
 
-       if ((adps_mode < 0) && (1 < adps_mode)) {
+       if ((adps_mode < 0) || (1 < adps_mode)) {
                WL_ERR(("%s: Invalid value %d.\n", __FUNCTION__, adps_mode));
                return -EINVAL;
        }