[PATCH][next] iwlwifi: mvm: fix comparison of u32 variable with less than zero

2019-07-01 Thread Colin King
From: Colin Ian King The comparison of the u32 variable wgds_tbl_idx with less than zero is always going to be false because it is unsigned. Fix this by making wgds_tbl_idx a plain signed int. Addresses-Coverity: ("Unsigned compared against 0") Fixes: 4fd445a2c855 ("iwlwifi: mvm: Add log inform

[PATCH][next] rsi: fix missing null pointer check from a failed ieee80211_probereq_get call

2019-02-21 Thread Colin King
From: Colin Ian King The call to ieee80211_probereq_get can return NULL if a skb allocation fails, so add a null pointer check and free an earlier skb on the error exit return path. Fixes: 7fdcb8e12660 ("rsi: add support for hardware scan offload") Signed-off-by: Colin Ian King --- drivers/net

[PATCH][next] rtlwifi: rtl8192ce: fix typo, "PairwiseENcAlgorithm" -> "PairwiseEncAlgorithm"

2019-02-20 Thread Colin King
From: Colin Ian King There is an uppercase 'N' that should be a lowercase 'n', fix this. Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c

[PATCH] rsi: fix indentation issue with a code block

2019-02-07 Thread Colin King
From: Colin Ian King There is a block of code that is indented at the wrong level. Fix this with extra tabbing. Signed-off-by: Colin Ian King --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireles

[PATCH] wlcore: clean up an indentation issue

2019-01-18 Thread Colin King
From: Colin Ian King There is a goto statement that is missing a tab for indentation. Fix this. Signed-off-by: Colin Ian King --- drivers/net/wireless/ti/wlcore/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireles

[PATCH] rtlwifi: rtl818x: fix indentation issue

2019-01-17 Thread Colin King
From: Colin Ian King There is a statement that is indented too deeply. Fix this. Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/driver

[PATCH] cw1200: fix indentation issues

2019-01-17 Thread Colin King
From: Colin Ian King There are two lines that have indentation issues, fix these. Signed-off-by: Colin Ian King --- drivers/net/wireless/st/cw1200/fwio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/st/cw1200/fwio.c b/drivers/net/wireless/st/cw1

[PATCH] libertas: fix indentation issue

2019-01-16 Thread Colin King
From: Colin Ian King There is a statement that is incorrectly indented, fix it. Signed-off-by: Colin Ian King --- drivers/net/wireless/marvell/libertas_tf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/libertas_tf/main.c b/drivers/net/w

[PATCH] NFC: st95hf: clean up indentation, add in missing tab on return statement

2018-12-30 Thread Colin King
From: Colin Ian King A return statement is not indented enough, fix this by adding the missing tab. Signed-off-by: Colin Ian King --- drivers/nfc/st95hf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c index a50a95

[PATCH] mt76: make const array 'data' static, shrinks object size

2018-12-30 Thread Colin King
From: Colin Ian King Don't populate the const array 'data' on the stack but instead make it static. Makes the object code smaller by 78 bytes: Before: textdata bss dec hex filename 54381080 065181976 mediatek/mt76/mt76x2/usb_mcu.o After: textdata

[PATCH] ray_cs: fix array out-of-bounds access

2018-12-20 Thread Colin King
From: Colin Ian King Currently array element org[3] is being accessed, however the array is only 3 elements in size, so this looks like an off-by-one out-of-bounds error. Fix this by using org[2], which I believe was the original intent. This issue has existed in the driver back in the pre-git d

[PATCH] staging: wilc1000: fix missing read_write setting when reading data

2018-12-19 Thread Colin King
From: Colin Ian King Currently the cmd.read_write setting is not initialized so it contains garbage from the stack. Fix this by setting it to 0 to indicate a read is required. Detected by CoverityScan, CID#1357925 ("Uninitialized scalar variable") Fixes: c5c77ba18ea6 ("staging: wilc1000: Add S

[PATCH][ath10k-next] ath10k: fix some spelling mistakes

2018-10-18 Thread Colin King
From: Colin Ian King Trivial fix to some spelling mistakes in ath10k_err and ath10k_dbg messages: "capablity" -> "capability" "registed" -> "registered" Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath10k/qmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --g

[PATCH] brcmfmac: fix spelling mistake "Retreiving" -> "Retrieving"

2018-10-16 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in brcmf_err error message. Signed-off-by: Colin Ian King --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/

[PATCH] iwlwifi: mvm: fix spelling mistake "Recieved" -> "Received"

2018-10-16 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in IWL_DEBUG_TE message text. Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/driver

[PATCH] rsi: fix spelling mistake "Initialzing" -> "Initializing"

2018-10-13 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in rsi_dbg debug message Signed-off-by: Colin Ian King --- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c b/drivers/net/wireles

[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 b/drivers/net/wireles

[PATCH] rtlwifi: rtl8821ae: replace _rtl8821ae_mrate_idx_to_arfr_id with generic version

2018-10-08 Thread Colin King
From: Colin Ian King Function _rtl8821ae_mrate_idx_to_arfr_id is functionally identical to the generic version rtl_mrate_idx_to_arfr_id, so remove _rtl8821ae_mrate_idx_to_arfr_id and use the generic one instead. This also fixes a missing break statement found by CoverityScan in _rtl8821ae_mrate

[PATCH] rtlwifi: rtl8821ae: add in a missing break in switch statement

2018-10-06 Thread Colin King
From: Colin Ian King The switch case RATR_INX_WIRELESS_MC has a missing break, this seems to be unintentional as the setting of variable ret gets overwritten when the case falls through to the following RATR_INX_WIRELESS_AC_5N case. Fix this by adding in the missing break. Detected by CoverityS

[PATCH][next] ath10k: fix out of bound read on array ath10k_rates

2018-10-05 Thread Colin King
From: Colin Ian King An out-of-bounds read on array ath10k_rates is occurring because the maximum number of elements is currently based on the size of the array and not the number of elements in the array. Fix this by using ARRAY_SIZE instead of sizeof. Detected by CoverityScan, CID#1473918 ("Ou

[PATCH] mt76: fix header guard macro define names

2018-09-30 Thread Colin King
From: Colin Ian King The header guards that are #defined are different from those being checked. Fix this by #defining them to the correct name. Fixes clang warnings: drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h:17:9: warning: '__MT76x02_MCU_H' is used as a header guard here, followed by #d

[PATCH] ipw2x00: clean up clang warning on extraneous parentheses

2018-09-30 Thread Colin King
From: Colin Ian King There are extraneous parantheses that are causing clang to produce a warning so remove these. Clean up clang warning: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/ipw2x00/ipw2200.c |

[PATCH] NFC: st95hf: fix spelling mistake "receieve" -> "receive"

2018-09-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King --- drivers/nfc/st95hf/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c index a50a95cfcfd8..d72d48243141 100644

[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 a/drivers/ne

[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 ("Resource Leak") Fixes: 4b

[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 a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi

[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 a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000

[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 index 72eb7c6b6e7f..e55099b1785d 100644 --- a/net/wirel

[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 a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/r

[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 overflow by making the const

[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 a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/n

[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 +- .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c| 2 +- .../net/wireless/realtek/rtlwifi/btco

[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 changed, 2 insertions(+), 2 deletions(-) diff --git a/dr

[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 2 files changed, 9 insertions(+), 9 deleti

[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 a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath

[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 a/drivers/net/wireless/ralink/rt2x00/rt2800.h b/drive

[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 by CoverityScan, CID#14677

[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 a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index

[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 a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c

[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 a/drivers/net/wireless/st/cw1200/txrx.c b/drivers/net/wireless/st/c

[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 null check") Fixes: e0024

[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 --- drivers/staging/wilc1000/host_interface.c | 75 +++--

[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") Signed-off-by: Colin Ian King

[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 --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821

[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 Signed-off-by: Colin Ian King --- dr

[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 changed, 1 deletion(-) diff --git a/drivers/net/wireless

[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 its initialization is neve

[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->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: Value stored to 'tq' du

[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 a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wi

[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' during its initialization is n

[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 an int type. Detected using

[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 --- drivers/net/wireless/ath/ath10k/pc

[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 a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci

[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 read Signed-off-by: Colin I

[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, CID#1463042 ("Unused Value") Fixes:

[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, CID#1463042 ("Unused Value") Fixes:

[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, CID#1164835 ("Logically dead

[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 - 1 file changed, 1 deletion(-) diff --git a/drivers/

[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 file changed, 2 deletions(-) diff --git a/drivers/ne

[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 the null return but instead

[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 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[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 +--- drivers/net/wireless/ti/wlcore/acx.c | 2 +- 2 files changed

[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 deletions(-) diff --git a/drivers/net/wireless/ti/wl125

[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 --git a/drivers/nfc/st21nfca/se.c b/drivers/nfc/st21

[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. Detected by CoverityScan, CI

[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 ("Logically dead code") Signed-off-b

[PATCH] zd1201: remove unused variable framelen

2017-11-07 Thread Colin King
From: Colin Ian King Variable framelen is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/zydas/zd1201.c:234:3: warning: Value stored to 'framelen' is never read Signed-off-by: Colin Ian King --- drivers/net/wireless/zydas/zd120

[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: Value stored to 'cfg_cmd' duri

[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 --- drivers/net/wireless/realtek/rtl

[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 --- drivers/net/wireless/i

[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 --- drivers/net/wireless/i

[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") and CID#1339506 ("Operands d

[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 --- drivers/nfc/fdp/fdp.c | 2 +- 1 file changed, 1 ins

[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: textdata bss dec hex f

[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 textdata bss dec

[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 textdata bss

[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: textdata bss dec

[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 After: textdata bss

[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 drivers/nfc/s3fwrn5/firmware.o After: t

[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: textdata bss dec hex f

[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. Detected by CoverityScan CID#13983

[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 array to zero. This seems t

[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 array to zero. This seems t

[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 a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c b/drivers/net/

[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 --- drivers/net/wireless/

[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 b/drivers/net/wireless/wl3501_cs.c index acec0d9ec422..

[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 a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireles

[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 a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c

[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 a/drivers/net/wireless/marvell/mwifiex/main.c b/driv

[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 a/drivers/net/wireless/zydas/zd1211rw/zd_rf_rf2959.c b/drivers/n

[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 bss dec hex fi

[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 --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2

[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") Signed-off-by: Colin Ian King -

[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 a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wirel

[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 a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000

[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 | 2 +- drivers/net/wireless/ath/ath10k/pci.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 fsm_state. Fix this by adding in the

[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 CoverityScan, CID#1437563 ("

[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 a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/a

  1   2   >