From: Anan Jaser Date: Tue, 22 Sep 2020 20:33:22 +0000 (+0400) Subject: wireless: bcmdhd4361: fix overlapping comparisons X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=280ab9c910d1654e2835587599ffbe81aa0a5641;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git wireless: bcmdhd4361: fix overlapping comparisons 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 --- diff --git a/drivers/net/wireless/bcmdhd4361/wl_android.c b/drivers/net/wireless/bcmdhd4361/wl_android.c index 27ce4d5bf0d8..a63c1a0ec615 100644 --- a/drivers/net/wireless/bcmdhd4361/wl_android.c +++ b/drivers/net/wireless/bcmdhd4361/wl_android.c @@ -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; }