Search Linux Wireless

Re: [PATCH] brcmsmac: Remove always false 'channel < 0' statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.11.2019 8:43, Austin Kim wrote:

As 'channel' is declared as u16, the following statement is always false.
    channel < 0

So we can remove unnecessary 'always false' statement.

   It's an expression, not a statement.

Signed-off-by: Austin Kim <austindh.kim@xxxxxxxxx>
---
  drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
index 3f09d89..7f2c15c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
@@ -5408,7 +5408,7 @@ int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel)
  {
  	u16 chspec = ch20mhz_chspec(channel);
- if (channel < 0 || channel > MAXCHANNEL)
+	if (channel > MAXCHANNEL)
  		return -EINVAL;
if (!brcms_c_valid_chanspec_db(wlc->cmi, chspec))

MBR, Sergei




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux