[PATCH] iwlwifi: fix spelling mistake "registrating" -> "registering"

2018-10-11 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in IWL_ERR error message Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c

[PATCH] b43: fix spelling mistake "hw_registred" -> "hw_registered"

2018-09-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake struct field name, rename it. Signed-off-by: Colin Ian King --- drivers/net/wireless/broadcom/b43/b43.h | 2 +- drivers/net/wireless/broadcom/b43/main.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH][staging-next] staging: wilc1000: fix incorrect allocation size for structure

2018-09-27 Thread Colin King
From: Colin Ian King Currently the allocation for str_vals is for the sizeof the pointer rather than the size of the structure. Fix this. Detected by smatch "wilc_wlan_cfg_init() error: not allocating enough data 392 vs 8" Fixes: acceb12a9f8b ("staging: wilc1000: refactor code to avoid static

[PATCH] ath10k: fix memory leak of tpc_stats

2018-05-27 Thread Colin King
From: Colin Ian King Currently tpc_stats is allocated and is leaked on the return path if num_tx_chain is greater than WMI_TPC_TX_N_CHAIN. Avoid this leak by performing the check on num_tx_chain before the allocation of tpc_stats. Detected by CoverityScan, CID#1469422

[PATCH] rsi: fix spelling mistake "Uknown" -> "Unknown"

2018-05-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in rsi_dbg message text Signed-off-by: Colin Ian King --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc1000: fix spelling mistake: "Preamle" -> "Preamble"

2018-05-22 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] cfg80211: fix spelling mistake: "uknown" -> "unknown"

2018-05-11 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in pr_debug message text Signed-off-by: Colin Ian King --- net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c

[PATCH] rsi: fix spelling mistake: "thead" -> "thread"

2018-05-10 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in rsi_dbg debug message text Signed-off-by: Colin Ian King --- drivers/net/wireless/rsi/rsi_91x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] mac80211: ethtool: avoid 32 bit multiplication overflow

2018-05-08 Thread Colin King
From: Colin Ian King The multiplication of 10 * cfg80211_calculate_bitrate() is a 32 bit operation and can overflow if cfg80211_calculate_bitrate is greater than 42949. Although I don't believe this is occurring at present, it would be safer to avoid the potential

[PATCH] wireless: ipw2200: fix spelling mistake: "functionalitis" -> "functionalities"

2018-05-01 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in module parameter description text Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rtlwifi: fix spelling mistake: "dismatch" -> "mismatch"

2018-04-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE message text. Signed-off-by: Colin Ian King --- .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c| 2 +-

[PATCH] wireless: ipw2100: fix spelling mistake: "decsribed" -> "described"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in comment and in the ord_data text Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +- drivers/net/wireless/intel/ipw2x00/ipw2100.h | 2 +- 2 files

[PATCH] mwifiex: fix spelling mistake: "capabilties" -> "capabilities"

2018-04-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in function names and text strings Signed-off-by: Colin Ian King --- drivers/net/wireless/marvell/mwifiex/sta_event.c | 10 +- drivers/net/wireless/marvell/mwifiex/uap_event.c | 8

[PATCH][next] ath10k: fix spelling mistake: "servive" -> "service"

2018-04-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ath10k_warn warning message text Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rt2x00: fix spelling mistake in various macros, UKNOWN -> UNKNOWN

2018-04-18 Thread Colin King
From: Colin Ian King Rename several macros that contain mispellings of UNKNOWN Signed-off-by: Colin Ian King --- drivers/net/wireless/ralink/rt2x00/rt2800.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH][next] iwlwifi: mvm: remove division by size of sizeof(struct ieee80211_wmm_rule)

2018-04-11 Thread Colin King
From: Colin Ian King The subtraction of two struct ieee80211_wmm_rule pointers leaves a result that is automatically scaled down by the size of the size of pointed-to type, hence the division by sizeof(struct ieee80211_wmm_rule) is bogus and should be removed. Detected

[PATCH] ath10k: fix spelling mistake: "tiggers" -> "triggers"

2018-03-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] ath6kl: fix spelling mistake: "chache" -> "cache"

2018-03-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath6kl/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] cw1200: fix spelling mistake: "Mailformed" -> "Malformed"

2018-03-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in wiphy_warn warning message text Signed-off-by: Colin Ian King --- drivers/net/wireless/st/cw1200/txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][next] wil6210: fix potential null dereference of ndev before null check

2018-03-28 Thread Colin King
From: Colin Ian King The pointer ndev is being dereferenced before it is being null checked, hence there is a potential null pointer deference. Fix this by only dereferencing ndev after it has been null checked Detected by CoverityScan, CID#1467010 ("Dereference before

[PATCH] staging: wilc1000: replace kmalloc + memcpy with kmemdup

2018-03-26 Thread Colin King
From: Colin Ian King Replace several allocation and memcpys with kmemdup and add in some missing memory allocation failure checks. Also fix an incorrect -EFAULT return with -ENOMEM. Signed-off-by: Colin Ian King ---

[PATCH] staging: wilc1000: check for kmalloc allocation failures

2018-03-21 Thread Colin King
From: Colin Ian King There are three kmalloc allocations that are not null checked which potentially could lead to null pointer dereference issues. Fix this by adding null pointer return checks. Detected by CoverityScan, CID#1466025-27 ("Dereference null return")

[PATCH] rtlwifi: rtl8821ae: fix spelling mistake: "Aboslute" -> "Absolute"

2018-03-19 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH][next] rsi: remove redundant duplicate assignment of buffer_size

2018-03-14 Thread Colin King
From: Colin Ian King Variable buffer_size is re-assigned the same value, this duplicated assignment is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/rsi/rsi_91x_usb.c:140:4: warning: Value stored to 'buffer_size' is never read

[PATCH] brcm80211: remove duplicated bit-wise or of IEEE80211_CHAN_NO_IR

2018-02-23 Thread Colin King
From: Colin Ian King Bit pattern IEEE80211_CHAN_NO_IR is being bit-wise or'd twice; remove the redundant 2nd IEEE80211_CHAN_NO_IR Signed-off-by: Colin Ian King --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c | 1 - 1 file

[PATCH] mac80211: remove redundant initialization to pointer 'hdr'

2018-02-02 Thread Colin King
From: Colin Ian King The pointer hrd is being initialized with a value that is never read and re-assigned a little later, hence the initialization is redundant and can be removed. Cleans up clang warning: net/mac80211/tx.c:1924:24: warning: Value stored to 'hdr' during

[PATCH] ath5k: remove duplicated re-assignment to pointer 'tq'

2018-02-01 Thread Colin King
From: Colin Ian King Pointer tq is initialized with >ah_txq[queue] and then a few lines later is re-assigned the same value, hence this duplicate assignment is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/ath/ath5k/qcu.c:326:25: warning:

[PATCH][next] wil6210: fix spelling mistake: "preperation"-> "preparation"

2018-01-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in debug error message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/wil6210/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] wireless: zd1211rw: remove redundant assignment of pointer 'q'

2018-01-30 Thread Colin King
From: Colin Ian King Pointer q is initialized and then almost immediately afterwards being re-assigned the same value. Remove the second redundant assignment. Cleans up clang warning: drivers/net/wireless/zydas/zd1211rw/zd_mac.c:503:23: warning: Value stored to 'q'

[PATCH] NFC: fdp: fix signed less or equal zero check in u8 max_size

2018-01-30 Thread Colin King
From: Colin Ian King The u8 variable max_size is being assigned a return value from the call to nci_conn_max_data_pkt_payload_size that can return a -ve error return. Since max_size is a u8, the -ve check for the error will always be false. Fix this by making max_size

[PATCH] ath10k: remove redundant -ve check against u32 integer size

2018-01-12 Thread Colin King
From: Colin Ian King Variable section_table.size is a u32 and so cannot be less than zero, hence the less than zero check is redundant and can be removed. Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0") Signed-off-by: Colin Ian King

[PATCH][next] ath10k: fix spelling mistake: "addrress" -> "address"

2018-01-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in warning message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][next] rtlwifi: btcoexist: remove redundant variable fw_ps_state

2018-01-09 Thread Colin King
From: Colin Ian King Variable fw_ps_state is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:736:2: warning: Value stored to 'fw_ps_state' is never

[PATCH][V2] wcn36xx: fix incorrect assignment to msg_body.min_ch_time

2017-12-29 Thread Colin King
From: Colin Ian King The second assignment to msg_body.min_ch_time is incorrect, it should actually be to msg_body.max_ch_time. Thanks to Bjorn Andersson for identifying the correct way to fix this as my original fix was incorrect. Detected by CoverityScan,

[PATCH][V2] wcn36xx: fix incorrect assignment to msg_body.min_ch_time

2017-12-29 Thread Colin King
From: Colin Ian King The second assignment to msg_body.min_ch_time is incorrect, it should actually be to msg_body.max_ch_time. Thanks to Bjorn Andersson for identifying the correct way to fix this as my original fix was incorrect. Detected by CoverityScan,

[PATCH] wl1251: check return from call to wl1251_acx_arp_ip_filter

2017-12-26 Thread Colin King
From: Colin Ian King Currently the less than zero error check on ret is incorrect as it is checking a far earlier ret assignment rather than the return from the call to wl1251_acx_arp_ip_filter. Fix this by adding in the missing assginment. Detected by CoverityScan,

[PATCH][next] wcn36xx: remove redundant assignment to msg_body.min_ch_time

2017-12-19 Thread Colin King
From: Colin Ian King msg_body.min_ch_time is being assigned twice; remove the redundant first assignment. Detected by CoverityScan, CID#1463042 ("Unused Value") Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/wcn36xx/smd.c | 1 -

[PATCH][next] ath10k: wmi: remove redundant integer fc

2017-12-18 Thread Colin King
From: Colin Ian King Variable fc is being assigned but never used, so remove it. Cleans up the clang warning: warning: Value stored to 'fc' is never read Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 -- 1

[PATCH] mt76: fix memcpy to potential null pointer on failed allocation

2017-12-14 Thread Colin King
From: Colin Ian King Currently if the allocation of skb fails and returns NULL then the call to skb_put will cause a null pointer dereference. Fix this by checking for a null skb and returning NULL. Note that calls to function mt76x2_mcu_msg_alloc don't directly check

[PATCH] brcmsmac: use ARRAY_SIZE on rfseq_updategainu_events

2017-12-07 Thread Colin King
From: Colin Ian King Use the ARRAY_SIZE macro on rfseq_updategainu_events to determine size of the array. Improvement suggested by coccinelle. Signed-off-by: Colin Ian King --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 3

[PATCH][V2] wlcore, wl1251: fix spelling: "Couldnt" -> "Couldn't" and remove error on -ENOMEM

2017-12-01 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in error message text. Also remove the error message on an kzalloc failure as this is redundant. Signed-off-by: Colin Ian King --- drivers/net/wireless/ti/wl1251/init.c | 4 +---

[PATCH] wlcore, wl1251: fix spelling mistake: "Couldnt" -> "Couldn't"

2017-12-01 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in error message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/ti/wl1251/init.c | 2 +- drivers/net/wireless/ti/wlcore/acx.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH] nfc: st21nfca: use setup_timer instead of init_timer

2017-11-24 Thread Colin King
From: Colin Ian King Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Colin Ian King --- drivers/nfc/st21nfca/se.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff

[PATCH] rsi: fix memory leak on buf and usb_reg_buf

2017-11-16 Thread Colin King
From: Colin Ian King In the cases where len is too long, the error return path fails to kfree allocated buffers buf and usb_reg_buf. The simplest fix is to perform the sanity check on len before the allocations to avoid having to do the kfree'ing in the first place.

[PATCH] rtlwifi: rtl818x: remove redundant check for cck_power > 15

2017-11-14 Thread Colin King
From: Colin Ian King cck_poweri cannot be greated than 15 as is derived from the bottom 4 bits from riv->channels[channel - 1].hw_value & 0xf. Hence the check for it being greater than 15 is redundant and can be removed. Detected by CoverityScan, CID#744303

[PATCH] rtlwifi: remove redundant initialization to cfg_cmd

2017-11-04 Thread Colin King
From: Colin Ian King cfg_cmd is initialized to zero and this value is never read, instead it is over-written in the start of a do-while loop. Remove the redundant initialization. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/core.c:1750:22: warning:

[PATCH] rtlwifi: remove redundant pointer tid_data

2017-11-03 Thread Colin King
From: Colin Ian King tid_data is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/base.c:1581:2: warning: Value stored to 'tid_data' is never read Signed-off-by: Colin Ian King

[PATCH] orinoco_usb: remove redundant pointer dev

2017-11-03 Thread Colin King
From: Colin Ian King The pointer dev is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/intersil/orinoco/orinoco_usb.c:1468:2: warning: Value stored to 'dev' is never read Signed-off-by: Colin Ian King

[PATCH] iwlegacy: remove redundant pointer sta_priv

2017-11-01 Thread Colin King
From: Colin Ian King Pointer sta_priv is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/intel/iwlegacy/4965-rs.c:2163:2: warning: Value stored to 'sta_priv' is never read Signed-off-by: Colin Ian King

[PATCH] staging: wilc1000: replace redundant computations with 0

2017-10-10 Thread Colin King
From: Colin Ian King Shifting and masking strHostIfSetMulti->enabled is redundant since enabled is a bool and so all the shifted and masked values will be zero. Replace them with zero to simplify the code. Detected by CoverityScan, CID#1339458 ("Bad shift operation")

[PATCH] NFC: fdp: make struct nci_ops static

2017-10-05 Thread Colin King
From: Colin Ian King The structure nci_ops is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'nci_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King ---

[PATCH] b43: make const arrays static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 60 bytes: Before: textdata bss dec hex filename 148161296 0 161123ef0 b43/phy_ht.o After: text

[PATCH] brcm80211: make const array ucode_ofdm_rates static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array ucode_ofdm_rates on the stack, instead make it static. Makes the object code smaller by 100 bytes: Before: textdata bss dec hex filename 39482 564 0 400469c6e phy_cmn.o After text

[PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-21 Thread Colin King
From: Colin Ian King Don't populate const array ac_to_fifo on the stack in an inlined function, instead make it static. Makes the object code smaller by over 800 bytes: textdata bss dec hex filename 159029 331541216 193399 2f377 4965-mac.o

[PATCH] mwifiex: make const array tos_to_ac static, reduces object code size

2017-09-19 Thread Colin King
From: Colin Ian King Don't populate the read-only const array tos_to_ac on the stack, instead make it static. Makes the object code smaller by 250 bytes: Before: textdata bss dec hex filename 261042720 128 289527118 wmm.o After:

[PATCH] ath9k: make const array reg_hole_list static, reduces object code size

2017-09-19 Thread Colin King
From: Colin Ian King Don't populate the read-only array reg_hole_list on the stack, instead make it static. Makes the object code smaller by over 200 bytes: Before: textdata bss dec hex filename 57518 15248 0 72766 11c3e debug.o

[PATCH] nfc: s3fwrn5: make array match static const, reduces object code size

2017-09-19 Thread Colin King
From: Colin Ian King Don't populate the read-only array match on the stack, instead make it static const. Makes the object code smaller by over 310 bytes: Before: textdata bss dec hex filename 83041084 1289516252c

[PATCH] mwifiex: make const arrays static to shink object code size

2017-09-16 Thread Colin King
From: Colin Ian King Don't populate const arrays on the stack, instead make them static Makes the object code smaller by nearly 300 bytes: Before: textdata bss dec hex filename 69260 16149 576 85985 14fe1 cfg80211.o After: text

[PATCH] rsi: fix a dereference on adapter before it has been null checked

2017-09-08 Thread Colin King
From: Colin Ian King The assignment of dev is dereferencing adapter before adapter has been null checked, potentially leading to a null pointer dereference. Fix this by simply moving the assignment of dev to a later point after the sanity null check of adapter.

[PATCH 2/2] b43legacy: fix unitialized reads of ret by initializing the array to zero

2017-09-05 Thread Colin King
From: Colin Ian King The u8 char array ret is not being initialized and elements outside the range start to end contain just garbage values from the stack. This results in a later scan of the array to read potentially uninitialized values. Fix this by initializing the

[PATCH 1/2] b43: fix unitialized reads of ret by initializing the array to zero

2017-09-05 Thread Colin King
From: Colin Ian King The u8 char array ret is not being initialized and elements outside the range start to end contain just garbage values from the stack. This results in a later scan of the array to read potentially uninitialized values. Fix this by initializing the

[PATCH] rtlwifi: rtl8821ae: fix spelling mistake: "faill" -> "failed"

2017-08-22 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rtlwifi: btcoex: make function btc8723b2ant_dac_swing static

2017-08-12 Thread Colin King
From: Colin Ian King The function btc8723b2ant_dac_swing is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'btc8723b2ant_dac_swing' was not declared. Should it be static? Signed-off-by: Colin Ian King

[PATCH] wl3501_cs: fix spelling mistake: "Insupported" -> "Unsupported"

2017-07-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in printk message Signed-off-by: Colin Ian King --- drivers/net/wireless/wl3501_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/wl3501_cs.c

[PATCH] mwifiex: fix spelling mistake: "Insuffient" -> "Insufficient"

2017-07-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in mwifiex_dbg debug message Signed-off-by: Colin Ian King --- drivers/net/wireless/marvell/mwifiex/tdls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc1000: fix spelling mistake: "Iinitialization" -> "initialization"

2017-07-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in netdev_err message Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] mwifiex: usb: fix spelling mistake: "aggreataon"-> "aggregation"

2017-07-24 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in aggr_ctrl module parameter message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/marvell/mwifiex/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] zd1211rw: fix spelling mistake 'hybernate' -> 'hibernate'

2017-07-13 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in PDEBUG debug message. Signed-off-by: Colin Ian King --- drivers/net/wireless/zydas/zd1211rw/zd_rf_rf2959.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rt2x00: make const array glrt_table static

2017-07-11 Thread Colin King
From: Colin Ian King Don't populate array glrt_table on the stack but make it static. Makes the object code a smaller by over 670 bytes: Before: textdata bss dec hex filename 1317724733 0 136505 21539 rt2800lib.o After: textdata

[PATCH] staging: wilc1000: fix a typo: "incative" -> "inactive"

2017-06-30 Thread Colin King
From: Colin Ian King Trivial fix to typos in netdev_err error messages. I should have spotted this in a previous round of spelling mistake checks on this driver but this one slipped through. Signed-off-by: Colin Ian King ---

[PATCH][-next] rtlwifi: kfree entry until after entry->bssid has been accessed

2017-06-30 Thread Colin King
From: Colin Ian King The current code kfree's entry and then dereferences it by accessing entry->bssid. Avoid the dereference-after-free by moving the kfree after the access to entry->bssid. Detected by CoverityScan, CID#1448600 ("Read from pointer after free")

[PATCH] mwifiex: fix spelling mistake: "secuirty" -> "security"

2017-06-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in mwifiex_dbg message Signed-off-by: Colin Ian King --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc1000: fix spelling mistake: "dissconect" -> "disconnect"

2017-06-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][-next] ath10k: fix a bunch of spelling mistakes in messages

2017-06-25 Thread Colin King
From: Colin Ian King Fix the following spelling mistakes in messages: syncronise -> synchronize unusally -> unusually addrress -> address inverval -> interval Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/mac.c

[PATCH] rsi: add in missing RSI_FSM_STATES into array fsm_state

2017-06-22 Thread Colin King
From: Colin Ian King Two recent commits added new RSI_FSM_STATES (namely FSM_FW_NOT_LOADED and FSM_COMMON_DEV_PARAMS_SENT) and the corresponding table fsm_state was not updated to match. This can lead to an array overrun when accessing the latter two states in

[PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Colin King
From: Colin Ian King The return value ret is unitialized and garbage is being returned for the three different error conditions when setting up the PCIe BARs. Fix this by initializing ret to -ENOMEM to indicate that the BARs failed to be setup correctly. Detected by

[PATCH] ath6kl: fix spelling mistake: "Indicat" -> "Indicate"

2017-06-04 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ath6kl_dbg debug message Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath6kl/htc_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][wireless-next] qtnfmac: check band before allocating cmd_skb to avoid resource leak

2017-06-02 Thread Colin King
From: Colin Ian King The current code allocates cmd_skb and then will leak this if band->band is an illegal value. It is simpler to sanity check the band first before allocating cmd_skb so that we don't have to free cmd_skb if an invalid band occurs. Detected by

[PATCH][-next] mwifiex: make function mwifiex_ret_pkt_aggr_ctrl static

2017-06-02 Thread Colin King
From: Colin Ian King function mwifiex_ret_pkt_aggr_ctrl can be made static as it does not need to be in global scope. Cleans up sparse warning: "symbol 'mwifiex_ret_pkt_aggr_ctrl' was not declared. Should it be static?" Signed-off-by: Colin Ian King

[PATCH][net-next] qtnfmac: remove duplicated assignment to mac

2017-05-25 Thread Colin King
From: Colin Ian King mac is being assigned twice, remove redundant 2nd assignment. Detected by CoverityScan, CID#1437554 ("Incorrect expression") Signed-off-by: Colin Ian King --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 +- 1

[PATCH] rtlwifi: rtl8723ae:fix spelling mistake: "Coexistance" -> "Coexistence"

2017-05-13 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE text Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rtlwifi: fix spelling mistake: "Pairwiase" -> "Pairwise"

2017-05-03 Thread Colin King
From: Colin Ian King trivial fixes to spelling mistakes in RT_TRACE messages. Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +-

[PATCH] ath5k: fix memory leak on buf on failed eeprom read

2017-05-03 Thread Colin King
From: Colin Ian King The AR5K_EEPROM_READ macro returns with -EIO if a read error occurs causing a memory leak on the allocated buffer buf. Fix this by explicitly calling ath5k_hw_nvram_read and exiting on the via the freebuf label that performs the necessary free'ing

[PATCH] NFC: trf7970a: fix check of clock frequencies, use && instead of ||

2017-04-24 Thread Colin King
From: Colin Ian King The "or" condition (clk_freq != TRF7970A_27MHZ_CLOCK_FREQUENCY) || (clk_freq != TRF7970A_13MHZ_CLOCK_FREQUE) will always be true because clk_freq cannot be equal to two different values at the same time. Use the && operator instead of || to fix

[PATCH] orinoco: fix spelling mistake: "Registerred" -> "Registered"

2017-04-22 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dbg_dbg message Signed-off-by: Colin Ian King --- drivers/net/wireless/intersil/orinoco/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc1000: fix incorrect strncasecmp length

2017-04-07 Thread Colin King
From: Colin Ian King The strncasecmp of buff against the literal string RSSI is using variable length which is zero. This should be instead using the variable size instead. Also remove the redundant variable length. Detected by PVS-Studio, warning: V575

[PATCH][V2] wlcore: fix spelling mistakes in wl1271_warning

2017-04-03 Thread Colin King
From: Colin Ian King trivial fix to spelling mistakes in wl1271_warning error message, change iligal to invalid and opperation to operation. Signed-off-by: Colin Ian King --- drivers/net/wireless/ti/wlcore/debugfs.c | 2 +- 1 file changed, 1

[PATCH] wlcore: fix spelling mistake in wl1271_warning 'iligal' -> 'illegal'

2017-04-03 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in wl1271_warning error message Signed-off-by: Colin Ian King --- drivers/net/wireless/ti/wlcore/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc1000: fix incorrect copy of pmkid data

2017-03-16 Thread Colin King
From: Colin Ian King The pmkid data is meant be be copied to the previous item in the pmkidlist, however the code is just copying the data to itself because the src index into pmkidlist is the same as the dst index into pmkidlist. Fix this with i + 1 instead of i.

[PATCH] ath10k: remove redundant check of len with buf_len

2017-03-15 Thread Colin King
From: Colin Ian King The check of len > buf_len is redundant as len is initialized to 0 and buf_len to 4096, so this comparison is always false. Remove it. Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/debug.c | 3 --- 1

[PATCH] staging: wilc1000: remove redundant result < 0 check

2017-02-28 Thread Colin King
From: Colin Ian King The check for result < 0 is redundant because at that point result is always zero, hence we can remove this check and the netdev_err message. Detected by CoverityScan, CID#1357147 ("Logically Dead Code") Signed-off-by: Colin Ian King

[PATCH] ath10k: remove redundant error check

2017-02-28 Thread Colin King
From: Colin Ian King The check on ret for an error is redundant because it is already been checked for non-zero earlier on and ret is never non-zero at this point. Fix this by removing the redundant check and error message. Detected by CoverityScan, CID#1357170

[PATCH] staging: wilc1000: add check for kmalloc allocation failure.

2017-02-28 Thread Colin King
From: Colin Ian King Add a sanity check that wid.val has been allocated, fixes a null pointer deference on stamac when calling ether_add_copy. Detected by CoverityScan, CID#1369537 ("Dereference null return value") Signed-off-by: Colin Ian King

[PATCH] wireless: ipw2200: remove redundant check of rc < 0

2017-02-27 Thread Colin King
From: Colin Ian King The check for rc < 0 is always false so the check is redundant and can be removed. Detected with CoverityScan, CID#101143 ("Logically dead code") Signed-off-by: Colin Ian King ---

[PATCH][V2] rtlwifi: rtl8192de: ix spelling mistake: "althougth" -> "though"

2017-02-26 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rtlwifi: rtl8192de: ix spelling mistake: "althougth" -> "although"

2017-02-26 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rtlwifi: fix spelling mistake: "conuntry" -> "country"

2017-02-22 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][V3] rtlwifi: fix spelling mistake: "encrypiton" -> "encryption"

2016-12-30 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] ath9k: fix spelling mistake: "meaurement" -> "measurement"

2016-12-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ath_err message Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath9k/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][V2] [media] gp8psk: fix spelling mistake: "firmare" -> "firmware"

2016-12-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in err message. Also change "don't" to "does not". Signed-off-by: Colin Ian King --- drivers/media/usb/dvb-usb/gp8psk.c | 2 +- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-

  1   2   >