[PATCH] staging: wilc1000: fix null checks on wilc

2018-09-11 Thread Colin King
From: Colin Ian King Currently the pointer wilc is being null checked several times and yet not checked for the final workqueue flush and destroy (which can lead to a null pointer dereference if wilc is null); these missing null checks were overlooked in an earlier core refactoring commit. Clean

[PATCH] staging: greybus: fix spelling mistake "entires" -> "entries"

2018-09-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake Signed-off-by: Colin Ian King --- drivers/staging/greybus/tools/README.loopback | 2 +- drivers/staging/greybus/tools/loopback_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/tools/README

[PATCH] staging: rtl8188eu, rtl8723bs: fix spelling mistake "evet" -> "event"

2018-09-23 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188e

[PATCH] staging: rtl8723bs: fix spelling mistake "toogle" -> "toggle"

2018-09-24 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in struct field name Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_debug.c| 2 +- drivers/staging/rtl8723bs/include/drv_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH] staging: rtl8723bs: fix spelling mistake "unvalid" -> "invalid"

2018-09-24 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in DBG_871X debug messages. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/st

[PATCH] staging: rtl8188eu: fix spelling mistake "transfoer_len" -> "transfer_len"

2018-09-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in DBG_88E debug message text. Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers

[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] media: zoran: fix spelling mistake "queing" -> "queuing"

2018-09-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in kernel warning message Signed-off-by: Colin Ian King --- drivers/staging/media/zoran/zoran_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/zoran/zoran_driver.c b/drivers/staging/media/zo

[PATCH] staging: rtl8723bs: 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 3 clang warnings: equality comparison with extraneous parentheses [-Wparentheses-equality] Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_security.

[PATCH] staging: bcm2835-camera: remove extraneous setting of dev->colourfx.enable

2018-10-08 Thread Colin King
From: Colin Ian King Currently dev->colourfx.enable is being set twice, hence the first occurrance is redundant and can be removed, so remove it. This minor issue was introduced by commit 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver."). Detected by CoverityScan CID#14

[PATCH] staging: rtl8188eu: fix spelling mistake "Abnornally" -> "Abnormally"

2018-10-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ODM_RT_TRACE trace message Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/hal/odm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.

[PATCH] staging: rtl8723bs: fix spelling mistake "Abnrormal" -> "Abnormal"

2018-10-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/odm_DIG.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DI

[PATCH] staging: rtlwifi: phydm: fix spelling mistake "Abnrormal" -> "Abnormal"

2018-10-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in message text Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/phydm/phydm_dig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm_dig.c b/drivers/staging/rtlwifi/phydm/ph

[PATCH] staging: rtl8188eu: fix spelling mistake "EINPROGESS" -> "EINPROGRESS"

2018-10-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE message text. Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/stag

[PATCH] drivers: staging: rtl*: fix spelling mistake "Orginial" -> "Original"

2018-10-15 Thread Colin King
From: Colin Ian King Trivial fix to common spelling mistakes in some rtl* drivers Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/hal/odm.c | 8 drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.c | 8 drivers/staging/rtlwifi/phydm/phydm_edcaturb

[PATCH] staging: rtl8188eu: fix typo in function name rtw_sctx_chk_waring_status

2018-10-27 Thread Colin King
From: Colin Ian King Trivial fix to typo in function name, rename it to rtw_sctx_chk_warning_status. Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/

[PATCH] staging: rtl8723bs: fix typo in function name rtw_sctx_chk_waring_status

2018-10-27 Thread Colin King
From: Colin Ian King Trivial fix to typo in function name, rename it to rtw_sctx_chk_warning_status. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/

[PATCH] staging: speakup: clean up few indentation issues

2018-10-30 Thread Colin King
From: Colin Ian King Trivial fix to clean up indentation issues across the driver Signed-off-by: Colin Ian King --- drivers/staging/speakup/kobjects.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 6 +++--- drivers/staging/speakup/speakup_keypc.c | 2 +- 3 files changed, 5 insertions(

[PATCH] staging: vt6656: clean up few indentation issues

2018-10-30 Thread Colin King
From: Colin Ian King Trivial fix to clean up indentation issues Signed-off-by: Colin Ian King --- drivers/staging/vt6656/firmware.c | 2 +- drivers/staging/vt6656/main_usb.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vt6656/firmware.c b/driver

[PATCH] staging: xgifb: clean an indentation issue

2018-10-30 Thread Colin King
From: Colin Ian King Trivial fix to clean up an indentation issue Signed-off-by: Colin Ian King --- drivers/staging/xgifb/XGI_main_26.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index eca0

[PATCH][staging-next] drivers: staging: cedrus: find ctx before dereferencing it ctx

2018-11-02 Thread Colin King
From: Colin Ian King Currently if count is an invalid value the v4l2_info message will dereference a null ctx pointer to get the dev information. Fix this by finding ctx first and then checking for an invalid count, this way ctxt will be non-null hence avoiding the null pointer dereference. Dete

[PATCH] staging: rtl8192u: rename struct name _rt_firmare_seg_container

2018-11-07 Thread Colin King
From: Colin Ian King Rename struct _rt_firmare_seg_container to _fw_seg_container to match the typedef name of this structure. Also removes the spelling mistake of 'firmare'. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/r8192U.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH] media: staging: tegra-vde: print long unsigned using %lu format specifier

2018-11-08 Thread Colin King
From: Colin Ian King The frame.flags & FLAG_B_FRAME is promoted to a long unsigned because of the use of the BIT() macro when defining FLAG_B_FRAME and causing a build warning. Fix this by using the %lu format specifer. Cleans up warning: drivers/staging/media/tegra-vde/tegra-vde.c:267:5: warnin

[PATCH] staging: most: use format specifier "%s" in snprintf

2018-11-09 Thread Colin King
From: Colin Ian King Passing string ch_data_type[i].name as the format specifier is potentially hazardous because it could (although very unlikely to) have a format specifier embedded in it causing issues when parsing the non-existent arguments to these. Follow best practice by using the "%s" fo

[PATCH] staging: mt7621-pinctrl: fix uninitialized variable ngroups

2018-11-10 Thread Colin King
From: Colin Ian King Currently the for_each_node_with_property loop us incrementing variable ngroups however it was not initialized and hence will contain garbage. Fix this by initializing ngroups to zero. Detected with static analysis with cppcheck: drivers/staging/mt7621-pinctrl/pinctrl-rt288

[PATCH] staging: comedi: fix spelling mistake "desination" -> "destination"

2018-11-27 Thread Colin King
From: Colin Ian King There is a spelling mistake in message text in the call to unittest, fix this. Signed-off-by: Colin Ian King --- drivers/staging/comedi/drivers/tests/ni_routes_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/tests/n

[PATCH] staging: rtlwifi: fix spelling mistake "disnabled" -> "disabled"

2018-11-27 Thread Colin King
From: Colin Ian King There is a spelling mistake in an ODM_RT_TRACE message, fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/phydm/phydm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm.c b/drivers/staging/rtlwifi/phyd

[PATCH] staging: rtl8188eu: fix spelling mistake "inferface" -> "interface"

2018-11-28 Thread Colin King
From: Colin Ian King Fix spelling mistake in module description text. Signed-off-by: Colin Ian King --- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_de

[PATCH] staging: speakup: i18n: fix spelling mistake "phoneticly" -> "phonetically"

2018-11-28 Thread Colin King
From: Colin Ian King There is a spelling mistake in array speakup_default_msgs at index MSG_FUNCNAME_SPELL_WORD_PHONETICALLY, fix this. Signed-off-by: Colin Ian King --- drivers/staging/speakup/i18n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/i

[PATCH] staging: rtl8723bs: Fix spelling mistake "disabed" -> "disabled"

2021-03-11 Thread Colin King
From: Colin Ian King There is a spelling mistake in a comment, fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/include/wifi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wi

[PATCH][next] staging: media: atomisp: fix memory leak of object flash

2020-09-02 Thread Colin King
From: Colin Ian King In the case where the call to lm3554_platform_data_func returns an error there is a memory leak on the error return path of object flash. Fix this by adding an error return path that will free flash and rename labels fail2 to fail3 and fail1 to fail2. Fixes: 9289cdf39992 ("

[PATCH][next] binder: remove redundant assignment to pointer n

2020-09-10 Thread Colin King
From: Colin Ian King The pointer n is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/android/binder_alloc.c | 2

[PATCH] staging/emxx_udc: fix indenting issue on a couple of statements

2020-09-18 Thread Colin King
From: Colin Ian King A couple of statements are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King --- drivers/staging/emxx_udc/emxx_udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/stagin

[PATCH][next] media: zoran: fix spelling mistake and make error message more meaningful

2020-10-02 Thread Colin King
From: Colin Ian King There is a spelling mistake in a pci_err error message. Fix this and make the error message a little more meaningful. Signed-off-by: Colin Ian King --- drivers/staging/media/zoran/zoran_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/st

[PATCH] staging: wfx: make a const array static, makes object smaller

2020-10-16 Thread Colin King
From: Colin Ian King Don't populate const array filter_ies on the stack but instead make it static. Makes the object code smaller by 261 bytes. Before: textdata bss dec hex filename 216743166 448 2528862c8 drivers/staging/wfx/sta.o After: textdata b

[PATCH] media: staging: rkisp1: rsz: make const array static, makes object smaller

2020-10-20 Thread Colin King
From: Colin Ian King Don't populate the const array dev_names on the stack but instead it static. Makes the object code smaller by 15 bytes. Before: textdata bss dec hex filename 170912648 64 198034d5b media/rkisp1/rkisp1-resizer.o After: textdata

[PATCH] staging: most: Fix spelling mistake "tranceiver" -> "transceiver"

2020-11-26 Thread Colin King
From: Colin Ian King There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/most/i2c/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/i2c/Kconfig b/drivers/staging/most/i2c/Kconfig index 19

[PATCH] staging: net: wimax: i2400m: fw: remove redundant initialization of variable result

2021-01-28 Thread Colin King
From: Colin Ian King The variable result is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/wimax/i2400m

[PATCH][next] staging: qlge: fix read of an uninitialized pointer

2021-02-03 Thread Colin King
From: Colin Ian King Currently the pointer 'reporter' is not being initialized and is being read in a netdev_warn message. The pointer is not used and is redundant, fix this by removing it and replacing the reference to it with priv->reporter instead. Addresses-Coverity: ("Uninitialized pointer

[PATCH][next] staging: most: sound: replace snprintf with strscpy

2018-12-18 Thread Colin King
From: Colin Ian King Using snprintf without a format specifier is potentially risky if the string device_name contains format specifiers. Replace this with the safer and more efficient strscpy. Cleans up clang warning: drivers/staging/most/sound/sound.c:673:41: warning: format string is not a st

[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][next] media: staging: intel-ipu3: fix unsigned comparison with < 0

2018-12-22 Thread Colin King
From: Colin Ian King The comparison css->pipes[pipe].bindex < 0 is always false because bindex is an unsigned int. Fix this by using a signed integer for the comparison. Detected by CoverityScan, CID#1476023 ("Unsigned compared against 0") Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add c

[PATCH] staging: rtl8712: clean up various indentation and coding style issues

2019-01-07 Thread Colin King
From: Colin Ian King There are several statements that are indented incorrectly so fix these. Also remove unnecessary { } braces and clean up a comment. Signed-off-by: Colin Ian King --- drivers/staging/rtl8712/ieee80211.c | 2 +- drivers/staging/rtl8712/rtl8712_led.c | 6 +++--- dri

[PATCH] staging: rtl8192e: fix various indentation issues

2019-01-07 Thread Colin King
From: Colin Ian King There are several statements that have indentation issues, fix these. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c |

[PATCH] staging: rtl8723bs: fix indentation issue with return statement

2019-01-22 Thread Colin King
From: Colin Ian King A return statement is indented incorrectly, fix this. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core

[PATCH] staging: comedi: dt2811: fix integer overflow in multiply

2019-02-02 Thread Colin King
From: Colin Ian King Multiplying two unsigned ints leads to an unsigned int result. The intention is that the result is a unsigned long long, so to fix the overflow cast the div to an unsigned long long to ensure that the multiplication is on unsigned long longs to avoid overflow. Detected by Co

[PATCH] staging: most: cdev: add missing check for cdev_add failure

2019-02-02 Thread Colin King
From: Colin Ian King Currently the call to cdev_add is missing a check for failure. Fix this by checking for failure and exiting via a new error path that ensures the allocated comp_channel struct is kfree'd. Detected by CoverityScan, CID#1462359 ("Unchecked return value") Fixes: 9bc79bbcd0c5 (

[PATCH] staging: rtl8192u: fix a null pointer dereference on a null dev pointer

2019-02-02 Thread Colin King
From: Colin Ian King There is an earlier null check on pointer dev which implies it may be null, however the assignment of pointer pref and the call to free_ieee82011 on a null dev can cause null pointer dereference errors. Fix this by moving the assignment of priv and the the call to free_ieee8

[PATCH][V2] staging: rtl8192u: remove redundant nul check on pointer dev

2019-02-04 Thread Colin King
From: Colin Ian King There is a null check on pointer dev which implies it may be null, however dev can never be null as it is set in rtl8192_usb_probe via the call to usb_set_intfdata. Detected by CoverityScan, CID#143078 ("Dereference after null check") Fixes: 8fc8598e61f6 ("Staging: Added Re

[PATCH] staging: rtlwifi: fix spelling mistake: "Hightest" -> "Highest"

2019-02-17 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in ODM_RT_TRACE message text, fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/phydm/phydm_rainfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm_rainfo.c b/drivers/

[PATCH] staging: rtl8723bs: remove unused code

2019-03-16 Thread Colin King
From: Colin Ian King There are two final hunks of code that are only built if SDIO_DYNAMIC_ALLOC_MEM is defined however this is never defined and if it was the code would lead to dereferencing an uninitialized pointer oldmem. It appears that a previous commit 1babeb0c3e59 ("Staging: rtl8723bs: R

[PATCH] staging: ks7010: remove redundant auth_type check

2019-03-18 Thread Colin King
From: Colin Ian King The range check on auth_type is redundant as there is a prior check on the auth_type values and the only way the block is entered is if auth_type is one of TYPE_PMK1, TYPE_GMK1 and TYPE_GMK1. Hence the auth_type check can be removed. Detected by static analysis with cppcheck

[PATCH] staging: rtl8192u: fix incorrect mask for EEPROMTxPowerLevelCCK setting

2019-03-28 Thread Colin King
From: Colin Ian King Currently the lower 8 bits of ret are being masked and left shifted by 8 bits always leaving a result of zero. The mask appears to be incorrect and should probably be 0xff00 instead of 0xff. Fix this. (Note: not tested). Fixes: 16feab644fd1 ("staging: rtl8192u: check retur

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

2019-04-04 Thread Colin King
From: Colin Ian King The NULL check on ram->u.wpa_ie.data is redudant as data is zero-length array and is not a pointer, so it can't be null. Remove the check. Addresses-Coverity: ("Array compared against 0") Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/ieee80211/ieee80211_softma

[PATCH] staging: rtl8723bs: remove redundant assignment to ret

2019-08-13 Thread Colin King
From: Colin Ian King Variable ret is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_io.c | 2 +- 1 file changed,

[PATCH] staging: rtl8192u: fix up indentation of a statement

2019-08-15 Thread Colin King
From: Colin Ian King There is a statement that is indented one level too deeply, remove the extraneous tab. Addresses-Coverity: ("Identation does not match nesting level") Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/r8190_rtl8256.c | 4 ++-- 1 file changed, 2 insertions(+), 2 de

[PATCH] staging: comedi: usbduxsigma: remove redundant assignment to variable fx2delay

2019-08-15 Thread Colin King
From: Colin Ian King Variable fx2delay is being initialized with a value that is never read and fx2delay is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/comedi/d

[PATCH] staging: rts5208: remove redundant assignment to retval

2019-08-18 Thread Colin King
From: Colin Ian King Variable retval is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/rts5208/ms.c | 2 +- 1 file changed, 1 inser

[PATCH] staging: rtl8192u: remove redundant assignment to pointer crypt

2019-08-22 Thread Colin King
From: Colin Ian King The pointer crypt is being set with a value that is never read, the assignment is redundant and hence can be removed. Thanks to Dan Carpenter for sanity checking that this was indeed redundant. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers

[PATCH] staging: rts5208: remove redundant sd30_mode checks

2019-08-30 Thread Colin King
From: Colin Ian King There are two hunks of code that check if sd30_mode is true however an earlier check in an outer code block on sd30_mode being false means that sd30_mode can never be true at these points so these checks are redundant. Remove the dead code. Addresses-Coverity: ("Logically d

[PATCH] staging: exfat: check for null return from call to FAT_getblk

2019-08-30 Thread Colin King
From: Colin Ian King A call to FAT_getblk is missing a null return check which can lead to a null pointer dereference. Fix this by adding a null check to match all the other FAT_getblk return sanity checks. Addresses-Coverity: ("Dereference null return") Fixes: c48c9f7ff32b ("staging: exfat: ad

[PATCH] staging: exfat: remove redundant goto

2019-08-30 Thread Colin King
From: Colin Ian King The goto after a return is never executed, so it is redundant and can be removed. Addresses-Coverity: ("Structurally dead code") Signed-off-by: Colin Ian King --- drivers/staging/exfat/exfat_super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dri

[PATCH] staging: exfat: fix uninitialized variable ret

2019-08-30 Thread Colin King
From: Colin Ian King Currently there are error return paths in ffsReadFile that exit via lable err_out that return and uninitialized error return in variable ret. Fix this by initializing ret to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: c48c9f7ff32b ("staging: exfat: add

[PATCH][V2] staging: exfat: remove return and error return via a goto

2019-09-02 Thread Colin King
From: Colin Ian King The return statement is incorrect, the error exit should be by assigning ret with the error code and exiting via label out. Thanks to Valdis Klētnieks for correcting my original fix. Addresses-Coverity: ("Structurally dead code") Signed-off-by: Colin Ian King --- V2: exit

[PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n

2019-09-05 Thread Colin King
From: Colin Ian King The variable n is being assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 1 - 1 file changed, 1 deletion(-) diff --g

[PATCH][V2] staging: rtl8723bs: hal: remove redundant variable n

2019-09-05 Thread Colin King
From: Colin Ian King The variable n is being assigned a value that is never read inside an if statement block, the assignment is redundant and can be removed. With this removed, n is only being used for a constant loop bounds check, so replace n with that value instead and remove n completely. A

[PATCH] media: imx7-mipi-csis: make array 'registers' static const, makes object smaller

2019-09-06 Thread Colin King
From: Colin Ian King Don't populate the array 'registers' on the stack but instead make it static const. Makes the object code smaller by 10 bytes. Before: textdata bss dec hex filename 201385196 128 254626376 staging/media/imx/imx7-mipi-csis.o After: text

[PATCH] staging: fbtft: make several arrays static const, makes object smaller

2019-09-06 Thread Colin King
From: Colin Ian King Don't populate the arrays on the stack but instead make them static const. Makes the object code smaller by 1329 bytes. Before: textdata bss dec hex filename 55811488 6471331bdd drivers/staging/fbtft/fb_hx8340bn.o 54441264

[PATCH] staging: rtl8188eu: make two arrays static const, makes object smaller

2019-09-06 Thread Colin King
From: Colin Ian King Don't populate two arrays on the stack but instead make them static const. Makes the object code smaller by 49 bytes. Before: textdata bss dec hex filename 268215616 0 324377eb5 rtl8188eu/core/rtw_ieee80211.o After: textdata b

[PATCH] staging: rtl8723bs: core: make array op_class static const, makes object smaller

2019-09-06 Thread Colin King
From: Colin Ian King Don't populate the array op_class on the stack but instead make it static const. Makes the object code smaller by 64 bytes. Before: textdata bss dec hex filename 9355379445056 106553 1a039 rtl8723bs/core/rtw_mlme_ext.o After: textdata

[PATCH][next] staging: rtl8723bs: os_dep: fix spelling mistake "offet" -> "offset"

2019-09-16 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DBG_871X error message. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/s

[PATCH] staging: rtl8192e: clean up indentation issue

2019-09-26 Thread Colin King
From: Colin Ian King The RT_TRACE is indented incorrectly, add in the missing tabs. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/sta

[PATCH] staging: vt6656: clean up an indentation issue

2019-09-27 Thread Colin King
From: Colin Ian King There is a block of code that is indented incorrectly, add in the missing tabs. Signed-off-by: Colin Ian King --- drivers/staging/vt6656/main_usb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/stag

[PATCH][next] staging: wfx: fix spelling mistake "hexdecimal" -> "hexadecimal"

2019-10-08 Thread Colin King
From: Colin Ian King There is a spelling mistake in the documentation and a module parameter description. Fix these. Signed-off-by: Colin Ian King --- .../devicetree/bindings/net/wireless/siliabs,wfx.txt| 2 +- drivers/staging/wfx/main.c | 2 +-

[PATCH][next] staging: wfx: fix swapped arguments in memset call

2019-10-09 Thread Colin King
From: Colin Ian King The memset appears to have the 2nd and 3rd arguments in the wrong order, fix this by swapping these around into the correct order. Addresses-Coverity: ("Memset fill truncated") Fixes: 4f8b7fabb15d ("staging: wfx: allow to send commands to chip") Signed-off-by: Colin Ian King

[PATCH][next] staging: wfx: fix spelling mistake "non existant" -> "non-existent"

2019-10-10 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/wfx/hif_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 52db02d3aa41..36e

[PATCH] staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS

2019-10-14 Thread Colin King
From: Colin Ian King Currently the exit return path when sme->key_idx >= NUM_WEPKEYS is via label 'exit' and this checks if result is non-zero, however result has not been initialized and contains garbage. Fix this by replacing the goto with a return with the error code. Addresses-Coverity: ("U

[PATCH] staging: rtl8192u: fix potential infinite loop because loop counter being too small

2019-11-01 Thread Colin King
From: Colin Ian King Currently the for-loop counter i is a u8 however it is being checked against a maximum value priv->ieee80211->LinkDetectInfo.SlotNum which is a u16. Hence there is a potential wrap-around of counter i back to zero if priv->ieee80211->LinkDetectInfo.SlotNum is greater than 255

[PATCH][next] staging: vboxsf: fix dereference of pointer dentry before it is null checked

2019-11-05 Thread Colin King
From: Colin Ian King Currently the pointer dentry is being dereferenced before it is being null checked. Fix this by only dereferencing dentry once we know it is not null. Addresses-Coverity: ("Dereference before null check") Fixes: df4028658f9d ("staging: Add VirtualBox guest shared folder (vb

[PATCH] staging: exfat: fix indentation issue

2019-11-13 Thread Colin King
From: Colin Ian King There is a declaration that requires indentation. Add in the missing tab. Signed-off-by: Colin Ian King --- drivers/staging/exfat/exfat_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/

[PATCH] staging: rtl8192u: fix indentation issue

2019-11-14 Thread Colin King
From: Colin Ian King There is a block of statements that are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 25 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/stagin

[PATCH] staging: rtl8723bs: fix indentation issue

2019-11-14 Thread Colin King
From: Colin Ian King There is a block of statements that are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_security.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs

[PATCH][next] staging: exfat: fix spelling mistake "maont" -> "mount"

2019-11-14 Thread Colin King
From: Colin Ian King There is a spelling mistake in a kernel info message. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/exfat/exfat_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.

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

2019-04-15 Thread Colin King
From: Colin Ian King There is a spelling mistake in a netdev_err error message, fix it. 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/w

[PATCH] staging: comedi: adv_pci1710: fix spelling mistake: "droput" -> "dropout"

2019-04-15 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dev_error message. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/comedi/drivers/adv_pci1710.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/co

[PATCH] staging: rtl8723bs: fix spelling mistake: "nonprintabl" -> "non-printable"

2019-04-17 Thread Colin King
From: Colin Ian King There is a spelling mistake in an RT_TRACE message, fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/stagin

[PATCH] staging: rtlwifi: fix spelling mistake "notity" -> "notify"

2019-04-17 Thread Colin King
From: Colin Ian King There are two spelling mistake in RT_TRACE messages. Fix them. Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c

[PATCH] staging: rtl8723bs: hal: fix spelling mistake "singal" -> "signal"

2019-04-18 Thread Colin King
From: Colin Ian King There are multiple spelling mistakes in variable names, fix these. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/hal_com.c | 18 +- drivers/staging/rtl8723bs/include/rtw_recv.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletion

[PATCH] staging: vc04_services: bcm2835-camera: remove redundant assignment to variable ret

2019-05-11 Thread Colin King
From: Colin Ian King The variable ret is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed. Addresses-Coverity: ("Unused Value") Signed-off-by: Colin Ian King --- drivers/staging/vc04_services/

[PATCH] staging: wilc1000: remove redundant masking of pkt_offset

2019-05-21 Thread Colin King
From: Colin Ian King The masking update of pkg_offset is redundant as the updated value is never read and pkg_offset is re-assigned on the next iteration of the loop. Clean this up by removing the redundant assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- dri

[PATCH] staging: vc04_services: remove redundant assignment to pointer service

2019-05-31 Thread Colin King
From: Colin Ian King Pointer service is being set to NULL however this value is never read and so the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- .../staging/vc04_services/interface/vchiq_arm/vchiq_shim.c| 4 +--- 1 fil

[PATCH] staging: davinci: fix memory leaks and check for allocation failure

2019-06-08 Thread Colin King
From: Colin Ian King There are three error return paths that don't kfree params causing a memory leak. Fix this by adding an error return path that kfree's params before returning. Also add a check to see params failed to be allocated. Addresses-Coverity: ("Resource leak") Fixes: da43b6ccadcf

[PATCH] staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work

2019-06-08 Thread Colin King
From: Colin Ian King In the default event case switchdev_work is being leaked because nothing is queued for work. Fix this by kfree'ing switchdev_work before returning NOTIFY_DONE. Addresses-Coverity: ("Resource leak") Fixes: 44baaa43d7cc ("staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet

[PATCH][next] staging: media: meson: remove redundant initialization of mpeg12

2019-06-12 Thread Colin King
From: Colin Ian King The pointer mpeg12 is being initialized however that value is never read and mpeg12 is being re-assigned almost immediately afterwards. Remove the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/media/meson/v

[PATCH] staging: rtl8723bs: remove redundant assignment to rtStatus

2019-06-17 Thread Colin King
From: Colin Ian King Variable rtStatus is initialized with a value that is never read and later it is reassigned a new value. Hence the initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/rtl8723b

[PATCH] staging: erofs: clean up initialization of pointer de

2019-06-17 Thread Colin King
From: Colin Ian King Currently pointer de is being initialized with a value that is never read and a few statements later de is being re-assigned. Clean this up by ininitialzing de and removing the re-assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/st

[PATCH][next] staging: comedi: usbdux: remove redundant initialization of fx2delay

2019-06-17 Thread Colin King
From: Colin Ian King Variable fx2delay is being initialized to a value that is never read and is being re-assigned a few statements later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/comedi/drivers/u

[PATCH] staging: kpc2000: fix integer overflow with left shifts

2019-06-18 Thread Colin King
From: Colin Ian King Currently there are several left shifts that are assigned to 64 bit unsigned longs where a signed int 1 is being shifted, resulting in an integer overflow. Fix this bit using the BIT_ULL macro to perform a 64 bit shift. Also clean up an overly long statement. Addresses-Cov

[PATCH] staging: rtl8723bs: os_dep: fix indentation on break statement

2019-06-19 Thread Colin King
From: Colin Ian King The break statement is indented one level too deep, fix this. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/stag

[PATCH] staging: vt6656: fix indentation on break statement

2019-06-19 Thread Colin King
From: Colin Ian King The break statement is indented one level too deep, fix this. Signed-off-by: Colin Ian King --- drivers/staging/vt6656/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 08fc03d8740

  1   2   3   4   >