[PATCH] staging: wilc1000: fix memory leak on mgmt_tx on error return path

2015-10-09 Thread Colin King
From: Colin Ian King Static analysis with cppcheck found the following memory leak: [drivers/staging/wilc1000/linux_mon.c:255]: (error) Memory leak: mgmt_tx Free mgmt_tx on the error return path when mgmt_tx->buff fails to be allocated. Signed-off-by: Colin Ian King

[PATCH] staging: wilc1000: fix spelling mistake: "interupts" -> "interrupts"

2016-06-23 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dev_err messages Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/wilc_sdio.c | 2 +- drivers/staging/wilc1000/wilc_spi.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH] Staging: iio: adc: fix indent on break statement

2016-01-23 Thread Colin King
From: Colin Ian King Fix indent warning when building with gcc 6: drivers/staging/iio/adc/ad7192.c:239:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] Signed-off-by: Colin Ian King ---

[PATCH] staging: wilc1000: remove wilc1000_spi_ops as it is not used

2016-02-15 Thread Colin King
From: Colin Ian King building with gcc 6 I hit a build failure: CC drivers/staging/wilc1000/wilc_spi.o drivers/staging/wilc1000/wilc_spi.c:123:34: error: storage size of ‘wilc1000_spi_ops’ isn’t known static const struct wilc1000_ops wilc1000_spi_ops;

[PATCH] staging: sm750fb: initialize max_d to maximum D value of 6

2016-03-29 Thread Colin King
From: Colin Ian King max_d is not initialized and should be set to the largest D value of 6. Signed-off-by: Colin Ian King --- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc1000: fix a couple of memory leaks

2016-03-21 Thread Colin King
From: Colin Ian King The ENOMEM error return paths are not free'ing allocated memory resulting in a memory leak of allocated structures. Perform the required kfree to fix the memory leaks. Issue discovered with static analysis using CoverityScan Signed-off-by: Colin

[PATCH] staging: speakup: ensure we do not overrun synths array

2016-05-09 Thread Colin King
From: Colin Ian King synth_add allows one to add MAXSYNTHS synths to the synths array; however it always NULLifies the next synth in the array which means that on the MAXSYNTHS synth we get an out-of-bounds write of the NULL to the synths array. Make the synths array

[PATCH] staging: comedi: dt2811: add parentheses to fix logic on s->subdev_flags

2016-07-25 Thread Colin King
From: Colin Ian King We need to add parentheses around ternary operations because currently the expression SDF_READABLE | (it->options[2] == 1) always evaluates to true, meaning s->subdev_flags is always assigned SDF_DIFF. Putting the parentheses around the ternarary

[PATCH] staging: ks7010: do not dereference priv if priv is null

2016-08-13 Thread Colin King
From: Colin Ian King priv is being dereferenced before a check for it being null is made, so there is a possibililty a null pointer deference can occur. Instead, only dereference priv if it is non-null. Signed-off-by: Colin Ian King ---

[PATCH] staging: ks7010: don't print skb->dev->name if skb is null

2016-08-15 Thread Colin King
From: Colin Ian King A null pointer dereference will occur when skb is null and skb->dev->name is printed. Replace the skb->dev->name with plain text "ks_wlan" to fix this. Signed-off-by: Colin Ian King ---

[PATCH] staging: wilc1000: correctly check if associatedsta has not been found

2016-08-15 Thread Colin King
From: Colin Ian King The current check for associatedsta being set to -1 to indicate it has not been found is not working because associatedsta is initialized to zero and will never be -1. Fix this by initializing it to ~0 and checking for ~0 instead. Signed-off-by:

[PATCH] staging: bcm2835-audio: use | instead of || otherwise result is just boolean 1

2017-02-01 Thread Colin King
From: Colin Ian King The incorrect or operator is being used resulting in cookies being set to 1 (true) rather than the intended hex value. Fix this by using | instead of ||. Issue found with static analysis with cppcheck Fixes: 0cec463e391e05b807a ("staging:

[PATCH 1/2] staging: rts5208: remove redundant retval status check

2017-02-02 Thread Colin King
From: Colin Ian King The retval status checks in the proceeding do loop return out of function ms_read_attritbute_info if there is an error condition, thus we never reach the end of the loop with retval failed status. Therefore, the retval status check at end of the

[PATCH 2/2] staging: rts5208: remove unncessary result set and check, just return SUCCESS

2017-02-02 Thread Colin King
From: Colin Ian King Minor clean up, there is no need to assign result to zero, then check if it is less than zero. Just return SUCCESS. Signed-off-by: Colin Ian King --- drivers/staging/rts5208/rtsx.c | 6 ++ 1 file changed, 2

[PATCH] [media] Staging: media/lirc: don't call put_ir_rx on rx twice

2017-02-17 Thread Colin King
From: Colin Ian King There is an exit path where rx is kfree'd on put_ir_rx and then a jump to label out_put_xx will again kfree it with another call to put_ir_rx. Fix this by adding a new label that avoids this 2nd call to put_ir_rx for this specific case. Detected

[PATCH] Staging: rtl8192e: remove redundant null check on array alg

2017-02-09 Thread Colin King
From: Colin Ian King u.crypt.alg is an array of u8 integers and hence the null check on this array is redundant and can be removed. Detected with CoverityScan, CID#146583 ("Array compared against 0") Signed-off-by: Colin Ian King ---

[PATCH] staging: rtl8192u: remove redundant null check on array alg

2017-02-09 Thread Colin King
From: Colin Ian King u.crypt.alg is an array of u8 integers and hence the null check on this array is redundant and can be removed. Detected with CoverityScan, CID#143214 ("Array compared against 0") Signed-off-by: Colin Ian King ---

[PATCH] staging: greybus: uart: fix uninitialized newline.flow_control

2017-02-09 Thread Colin King
From: Colin Ian King Currently newline.flow_control is uninitialized, so it can contain any garbage from the stack. I believe it should be initialized with GB_SERIAL_AUTO_RTSCTS_EN enabled if the termios c_cflag is CRTSCTS enabled. Signed-off-by: Colin Ian King

[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] 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] staging: ks7010: fix two memory leaks on error return path

2016-09-09 Thread Colin King
From: Colin Ian King On the error case where there is an invalid MAC address there is memory leak on packet and pp on the error return. Free these first before returning to fix the leak. Signed-off-by: Colin Ian King ---

[PATCH] greybus: audio: ensure module is set to avoid crash on dev_err message

2016-09-23 Thread Colin King
From: Colin Ian King Currently, if info is null, the dev_err message is dereferencing an uninitialized module pointer. Instead, initialize module before the dev_err call to fix this issue. Found using static analysis with cppcheck:

[PATCH] staging: ks7010: avoid dereferencing packet if it is null

2016-09-07 Thread Colin King
From: Colin Ian King Updating tx_bytes from packet->len if packet is null will cause a null pointer dereference, so only update tx_bytes if it packet is not null. Signed-off-by: Colin Ian King --- drivers/staging/ks7010/ks_wlan_net.c | 2 +-

[PATCH] staging: wilc1000: fix spelling mistake: "retyring" -> "retrying"

2016-08-28 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/wilc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] Staging: comedi: fix spelling mistake "Firmare" -> "Firmware"

2016-08-22 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in dev_dbg message. Signed-off-by: Colin Ian King --- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: lustre: lov: Fix signed wrap around when decrementing index 'i'

2016-11-10 Thread Colin King
From: Colin Ian King Change predecrement compare to post decrement compare to avoid an unsigned integer wrap-around comparisomn when decrementing in the while loop. Issue found with static analysis with CoverityScan, CID 1375917 Signed-off-by: Colin Ian King

[PATCH] staging: iio: cdc: ad7746: set ret on IIO_VOLTAGE case

2016-10-25 Thread Colin King
From: Colin Ian King For a IIO_VOLTAGE case, ret is not being set causing an uninitialized value being returned by ad7746_read_raw. Fix this by setting ret to IIO_VAL_INT for this specific case. Signed-off-by: Colin Ian King ---

[PATCH] staging: unisys: ix spelling mistake of "outstanding"

2016-11-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "oustanding" to "outstanding". Signed-off-by: Colin Ian King --- drivers/staging/unisys/visornic/visornic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: r8188eu: fix spelling mistake on xmitframe_coalsece

2016-12-29 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake of function name in debuf message, should be xmitframe_coalesce instead of xmitframe_coalsece. Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 2 +- 1

[PATCH] netvsc: fix dereference before null check errors

2017-03-25 Thread Colin King
From: Colin Ian King ndev is being checked to see if it is a null pointer however before the null check ndev is being dereferenced; hence there is a potential null pointer dereference bug that needs fixing. Fix this by only dereferencing ndev after the null check.

[PATCH] netvsc: fix unititialized return value in variable ret

2017-03-25 Thread Colin King
From: Colin Ian King It is possible for an uninitialized value of ret to be returned so fix this by initializing ret to zero. Detected by CoverityScan, CID#1420762 ("Uninitialized scalar variable") Fixes: 163891d7d429 ("netvsc: handle offline mtu and channel change")

[PATCH] staging/atomisp: fix spelling mistake: "falied" -> "failed"

2017-03-30 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King --- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: bcm2835-camera: fix spelling mistake: "elementry" -> "elementary"

2017-03-30 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in various comments and pr_debug messages Signed-off-by: Colin Ian King --- drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +-

[PATCH] staging: vc04_services: fix NULL pointer dereference on pointer 'service'

2017-03-20 Thread Colin King
From: Colin Ian King Currently, if pservice is null then service is set to NULL and immediately afterwards service is dereferenced causing a null pointer dereference. Fix this by bailing out early of the function with a null return. Detected by CoverityScan,

[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] staging: rtl8723bs: ensure cmd is large enough for %4s scanf format

2017-04-11 Thread Colin King
From: Colin Ian King char array cmd is being scanned in using a %4s scanf format specifier and so cmd must be an array of 5 chars. Increase size to 5 chars to ensure we don't have an overflow. Detected with static analysis by cppcheck: "(error) Width 4 given in format

[PATCH] staging: rtl8723bs: fix spelling mistake: "acquire"

2017-04-11 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in pr_info message Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: rtl8723bs: fix spelling mistakes in RT_TRACE messages

2017-04-11 Thread Colin King
From: Colin Ian King Fix a few spelling mistakes in RT_TRACE messages and split up wide lines to span multiple lines Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 4 +++-

[PATCH] staging: rtl8192u: fix spelling mistake in variable name *attentuation

2017-04-21 Thread Colin King
From: Colin Ian King Fix the spelling of a bunch of variables, from *attentuation to *attenuation. No functional change. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/r8192U.h | 8 ++---

[PATCH] staging: rtl8723bs: remove redundant comparisons of unsigned ints with >= 0

2017-04-13 Thread Colin King
From: Colin Ian King The comparison of mode >= 0 is redundant as mode is a u32 and this is always true. Remove this redundant code. Detected with CoverityScan ("Unsigned compared against 0") Signed-off-by: Colin Ian King ---

[PATCH] staging: media: atomisp: fix range checking on clk_num

2017-04-14 Thread Colin King
From: Colin Ian King The range checking on clk_num is incorrect; fix these so that invalid clk_num values are detected correctly. Detected by static analysis with by PVS-Studio Signed-off-by: Colin Ian King ---

[PATCH] staging: rtl8723bs: clean up identical code on an if statement

2017-04-13 Thread Colin King
From: Colin Ian King The two different paths for an if statement are identical and hence we can just replace it with the single statement. Detected by CoverityScan, CID#1428443 ("Identical code for different branches") Signed-off-by: Colin Ian King

[PATCH] staging: atomisp: clean up return logic, remove redunant code

2017-03-11 Thread Colin King
From: Colin Ian King There is no need to check if ret is non-zero, remove this redundant check and just return the error status from the call to mt9m114_write_reg_array. Detected by CoverityScan, CID#1416577 ("Identical code for different branches") Signed-off-by:

[PATCH] staging: atomisp: remove redundant check for client being null

2017-03-11 Thread Colin King
From: Colin Ian King The previous statement checks if client is null, so the null check when assigning dev is redundant and can be removed. Detected by CoverityScan, CID#1416555 ("Logically Dead Code") Signed-off-by: Colin Ian King ---

[PATCH] staging: atomisp: fix missing break in switch statement

2017-03-13 Thread Colin King
From: Colin Ian King I believe there is a missing break in the switch statement for case V4L2_CID_FOCUS_STATUS as the current fall-through looks suspect to me. Detected by CoverityScan, CID#1416580 ("Missing break in switch") Signed-off-by: Colin Ian King

[PATCH] staging/atomisp: remove redundant null check on frame

2017-03-13 Thread Colin King
From: Colin Ian King There is no need to perform a null check on frame as there is an earlier null check check and return hence making the null check redundant. Remove it. Detected by CoverityScan, CID#1416563 ("Logically Dead Code") Signed-off-by: Colin Ian King

[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] staging: fsl-mc: fix fsl_mc_is_allocatable strcmps

2017-08-16 Thread Colin King
From: Colin Ian King The previous fix removed the equal to zero comparisons by the strcmps and now the function always returns true. Fix this by adding in the missing logical negation operators. Detected by CoverityScan, CID#1452267 ("Constant expression result")

[PATCH] [media] staging: media: davinci_vpfe: fix spelling mistake in variable

2017-07-13 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake, rename the function name resizer_configure_in_continious_mode to resizer_configure_in_continuous_mode and also remove an extraneous space. Signed-off-by: Colin Ian King ---

[PATCH] staging: lustre: fix spelling mistake, "grranted" -> "granted"

2017-07-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in CERROR error message Signed-off-by: Colin Ian King --- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][V2] staging: fbtft: make const array gamma_par_mask static

2017-07-11 Thread Colin King
From: Colin Ian King Don't populate array gamma_par_mask on the stack but instead make it static. Makes the object code smaller by 148 bytes: Before: textdata bss dec hex filename 29931104 040971001

[PATCH][V2] staging: lustre: fix spelling mistake, "grranted" -> "granted"

2017-07-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in CERROR error message. Also clean up the grammar. Signed-off-by: Colin Ian King --- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] staging: pi433: Fix a couple of spelling mistakes

2017-07-17 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes in dev_dbg debug messages "wiat" -> "wait" "fonud" -> "found" Signed-off-by: Colin Ian King --- drivers/staging/pi433/pi433_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 3/3][staging-next] staging: pi433: fix thread_run failure check

2017-07-18 Thread Colin King
From: Colin Ian King The check for thread_run failure is incorrect, use IS_ERR instead. Cleans up sparse error message: "error: incompatible types for operation (<)" Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Colin Ian King

[PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static

2017-07-18 Thread Colin King
From: Colin Ian King The function rf69_set_bandwidth_intern is local to the source and do not need to be in global scope, so make it static. Also break overly wide line. Cleans up sparse warning: symbol 'update_share_count' was not declared. Should it be static?

[PATCH 1/3][staging-next] staging: pi433: Make a couple of functions static

2017-07-18 Thread Colin King
From: Colin Ian King The functions pi433_receive and pi433_tx_thread are local to the source and do not need to be in global scope, so make them static Cleans up sparse warnings: symbol 'pi433_receive' was not declared. Should it be static? symbol 'pi433_tx_thread' was

[PATCH] staging: lustre: lnet: fix incorrect arguments order calling lstcon_session_new

2017-07-19 Thread Colin King
From: Colin Ian King The arguments args->lstio_ses_force and args->lstio_ses_timeout are in the incorrect order. Fix this by swapping them around. Detected by CoverityScan, CID#1226833 ("Arguments in wrong order") Signed-off-by: Colin Ian King

[PATCH] staging: vboxvideo: make a couple of symbols static

2017-07-19 Thread Colin King
From: Colin Ian King Module parameter vbox_modeset and structure vbox_bo_driver do not need to be in global scope and hence can be made static. Cleans up a couple of sparse warnings: symbol 'vbox_modeset' was not declared. Should it be static? symbol 'vbox_bo_driver'

[PATCH] Make functions rf69_set_bandwidth_intern and rf69_set_dc_cut_off_frequency_intern static

2017-07-20 Thread Colin King
From: Colin Ian King The functions rf69_set_bandwidth_intern and also rf69_set_dc_cut_off_frequency_intern is local to the source and do not need to be in global scope, so make it static. Also break break overly wide line. Finally, remove the function declaration

[PATCH] staging: rtl8192u: fix incorrect mask and shift on u8 data

2017-07-21 Thread Colin King
From: Colin Ian King The cfg_action bit comes from the high bit of pmsg[4] so the current mask and shift are in correct and always result in zero. Fix this by using the correct mask and shif to get the correct cfg_action bit value. Detected by CoverityScan, CID#142890

[PATCH] staging: rtl8192u: fix spelling mistake: "Senondary" -> "Secondary"

2017-07-24 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in IEEE80211_DEBUG message Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.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] 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] staging: rtl8192e: fix spelling mistake: "respose" -> "response"

2017-06-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in netdev_info message and split line to clean up an checkpatch line too wide warning. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192e/rtllib_softmac.c | 3 ++- 1 file changed,

[PATCH] staging: speakup: make function ser_to_dev static

2017-06-28 Thread Colin King
From: Colin Ian King The helper function ser_to_dev does not need to be in global scope, so make it static. Cleans up sparse warning: "warning: symbol 'ser_to_dev' was not declared. Should it be static?" Signed-off-by: Colin Ian King ---

[PATCH] staging: ks7010: fix spelling mistake: "errror" -> "error"

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

[PATCH] Revert "staging: fsl-mc: be consistent when checking strcmp() return"

2017-08-16 Thread Colin King
From: Colin Ian King The previous fix removed the equal to zero comparisons by the strcmps and now the function always returns true. Revert this change to restore the original correctly functioning code. Detected by CoverityScan, CID#1452267 ("Constant expression

[PATCH][V2] Revert "staging: fsl-mc: be consistent when checking strcmp() return"

2017-08-16 Thread Colin King
From: Colin Ian King The previous fix removed the equal to zero comparisons by the strcmps and now the function always returns true. Revert this change to restore the original correctly functioning code. Detected by CoverityScan, CID#1452267 ("Constant expression

[PATCH][staging-next] staging: typec: tcpm: make function tcpm_get_pwr_opmode

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

[PATCH] staging/rts5208: fix incorrect shift to extract upper nybble

2017-08-18 Thread Colin King
From: Colin Ian King The mask of sns_key_info1 suggests the upper nybble is being extracted however the following shift of 8 bits is too large and always results in 0. Fix this by shifting only by 4 bits to correctly get the upper nybble. Detected by CoverityScan,

[PATCH] staging: rtl8188eu, rtl8723bs: fix spelling mistake "Cancle" -> "Cancel"

2017-05-13 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes in a comments and RT_TRACE text. Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++-- drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++-- 2 files changed,

[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][media] atomisp: make repool_pgnr and punit_ddr_dvfs_enable static

2017-06-02 Thread Colin King
From: Colin Ian King integer repool_pgnr and function punit_ddr_dvfs_enable can be made static as they do not need to be in global scope. Cleans up sparse warnings: "symbol 'repool_pgnr' was not declared. Should it be static?" "symbol 'punit_ddr_dvfs_enable' was not

[PATCH][V2] staging: ccree: fix spelling mistake: "chanined" -> "chained"

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

[PATCH] taging: ccree: fix spelling mistake: "chanined" -> "chained"

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

[PATCH] staging: rtl8723bs: fix another spelling mistake

2017-06-03 Thread Colin King
From: Colin Ian King I found one more spelling mistake in a DBG_8192C debug message, replace "avaliable" with "available", add some spacing between text and a number and split overly long line Signed-off-by: Colin Ian King ---

[PATCH] staging: rtl8723bs: fix a couple of spelling mistakes

2017-06-03 Thread Colin King
From: Colin Ian King Replace cant with cannot, argumetns with arguments and add line break to overly long DBG_871X statement. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/hal_com.c | 5 +++-- 1 file changed, 3

[PATCH][V2] staging: rtl8723bs: fix a couple of spelling mistakes

2017-06-05 Thread Colin King
From: Colin Ian King Replace cant with cannot, argumetns with arguments and add line break to overly long DBG_871X statement. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/hal_com.c | 5 +++-- 1 file changed, 3

[PATCH] atomisp: ensure that status values > 7 are reported as errors

2017-06-06 Thread Colin King
From: Colin Ian King The current code checks if a status value is greater than 7 and sets the status string as "ERROR" and then over writes the string based on the bottom 3 bits of the value. Instead, fix this by only checking on the bottom 3 bits of the value if the

[PATCH] staging: iio: ade7759: fix signed extension bug on shift of a u8

2017-09-13 Thread Colin King
From: Colin Ian King The current shift of st->rx[2] left shifts a u8 24 bits left, promotes the integer to a an int and then to a unsigned u64. If the top bit of st->rx[2] is set then we end up with all the upper bits being set to 1. Fix this by casting st->rx[2] to a

[PATCH] staging: ccree: remove unused and redundant variable idx

2017-09-16 Thread Colin King
From: Colin Ian King Variable idx is being set but never read and thus it can be removed because it is redundant. Cleans up clang build warnings: warning: Value stored to 'idx' during its initialization is never read warning: Value stored to 'idx' is never read

[PATCH] staging: fbtft: remove redundant initialization of txbuf16

2017-09-16 Thread Colin King
From: Colin Ian King txbuf16 is being initialized at declaration time and then later set to another value without it being read inbetween, hence making the initialization redundant. Fix this by setting txbuf16 just the once. Also clean up some incorrect indentations.

[PATCH] staging: xgifb: make const array static to shink object code size

2017-09-21 Thread Colin King
From: Colin Ian King Don't populate const array LCDARefreshIndex on the stack, instead make it static. Makes the object code smaller by 340 bytes: Before: textdata bss dec hex filename 84949 12336 0 97285 17c05

[PATCH] staging: rtl8723bs: avoid null pointer dereference on pmlmepriv

2017-09-20 Thread Colin King
From: Colin Ian King There is a check to see if pmlmepriv is null before vfree'ing pmlmepriv->free_bss_buf hence implying pmlmepriv could potenially be null. However, a previous call to rtw_free_mlme_priv_ie_data can also dereference pmlmepriv, so move this call so that

[PATCH] staging: rtl8723bs: add missing range check on id

2017-09-20 Thread Colin King
From: Colin Ian King The value of the u8 id needs to be upper bounds checked to ensure the cam_cache array on the adapter dvobj is not indexed outside of the allowed range of 0..TOTAL_CAM_ENTRY-1. This can currently occur if id is >= TOTAL_CAM_ENTRY when calling

[PATCH] staging: rtl8192e: make const array broadcast_addr static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array broadcast_addr on the stack, instead make it static. Makes the object code smaller by over 40 bytes: Before: textdata bss dec hex filename 6390682481216 73370 11e9a rtllib_softmac.o

[PATCH] hv_netvsc: make const array ver_list static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array ver_list on the stack, instead make it static. Makes the object code smaller by over 400 bytes: Before: textdata bss dec hex filename 184443168 320 2193255ac drivers/net/hyperv/netvsc.o

[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][V2] staging: r8822be: fix null pointer dereferences with a null driver_adapter

2017-09-08 Thread Colin King
From: Colin Ian King The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on a null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null

[PATCH] fix null pointer dereferences with a null driver_adapter

2017-09-08 Thread Colin King
From: Colin Ian King The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on a null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null

[PATCH] staging: rtl8192u: fix incorrect mask when calculating TxPowerLevelCCK

2017-09-05 Thread Colin King
From: Colin Ian King The mask of 0xff and right shift of 8 bits on ret always results in a value of 0 for TxPowerLevelCCK. I believe this should be a mask of 0xff00, however I do not have the hardware at hand to test this out, so there is a distinct possibility I may

[PATCH] staging: rtlwifi: make various structures static

2017-10-02 Thread Colin King
From: Colin Ian King The structures created from macros RTL_DEBUG_IMPL_MAC_SERIES, RTL_DEBUG_IMPL_BB_SERIES, RTL_DEBUG_IMPL_RF_SERIES and RTL_DEBUG_IMPL_CAM_SERIES are all local to the source and do not need to be in global scope, so make them static. Cleans up 37

[PATCH][next] staging: r8822be: fix a couple of spelling mistakes

2017-08-22 Thread Colin King
From: Colin Ian King Trivial fixes to spelling mistake in pr_err error messages: errorr -> error mismactch -> mismatch Signed-off-by: Colin Ian King --- .../staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 2 +-

[PATCH] staging: r8822be: fix null pointer dereference with a null driver_adapter

2017-08-23 Thread Colin King
From: Colin Ian King The call to _rtl_dbg_trace via macro HALMAC_RT_TRACE will trigger a null pointer deference on the null driver_adapter. Fix this by assigning driver_adapter earlier to halmac_adapter->driver_adapter before the tracing call so that a non-null

[PATCH][next] staging: r8822be: fix memory leak of eeprom_map on error exit return

2017-08-23 Thread Colin King
From: Colin Ian King A memory leak of eeprom_map occurs if the call to halmac_eeprom_parser_88xx fails. Fix this by kfree'ing it before returning. Detected by CoverityScan, CID#1454569 ("Resource leak") Fixes: 938a0447f094 ("staging: r8822be: Add code for halmac

[PATCH] staging: rts5208: rename mmc_ddr_tunning_rx_cmd to mmc_ddr_tuning_rx_cmd

2017-08-31 Thread Colin King
From: Colin Ian King Trival fix to spelling mistake in function name Signed-off-by: Colin Ian King --- drivers/staging/rts5208/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/sd.c

[PATCH][staging-next] staging: pi433: fix spelling mistake: "preample" -> "preamble"

2017-08-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in dev_dbg message Signed-off-by: Colin Ian King --- drivers/staging/pi433/rf69.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c

[PATCH][staging-next] staging: unisys: visorbus: make two functions static

2017-09-01 Thread Colin King
From: Colin Ian King The functions sig_queue_offset and sig_data_offset are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'sig_queue_offset' was not declared. Should it be static? symbol

[PATCH][staging-next] staging: typec: fusb302: make structure fusb302_psy_desc static

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

[PATCH] drivers: hv: balloon: remove extraneous assignment to region_start

2017-10-18 Thread Colin King
From: Colin Ian King The variable region_start is assigned twice, the first value is never read and redundant, so can be removed. We can clean up the code further by assigning rg_start directly rather than using the temporary variable region_start which can then be

  1   2   3   4   >