[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

[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

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

[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

[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: 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

[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

[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

[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][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] staging: rtl8192e: fix missing failure check on a call to dev_alloc_name

2020-08-21 Thread Colin King
From: Colin Ian King Currently the second call to dev_alloc_name is not checking if this failed. Add the check and perform necessary cleanup on an error. Addresses-Coverity: ("Unchecked return value") Fixes: 94a799425eee ("rtl8192e: Import new version of driver from realtek") Signed-off-by:

[PATCH][next] staging: spmi: hisi-spmi-controller: fix spelling mistake "controlller" -> "controller"

2020-08-20 Thread Colin King
From: Colin Ian King There is a spelling mistake in the MODULE_ALIAS, fix it. Signed-off-by: Colin Ian King --- drivers/staging/hikey9xx/hisi-spmi-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c

[PATCH] staging: kpc2000: kpc_dma: fix spelling mistake "for for" -> "for"

2020-08-18 Thread Colin King
From: Colin Ian King There are a couple of duplicated "for" spelling mistakes in dev_err error messages. Fix these. Signed-off-by: Colin Ian King --- drivers/staging/kpc2000/kpc_dma/fileops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] media: atomisp: fix spelling mistake "unsupport" -> "unsupported"

2020-08-06 Thread Colin King
From: Colin Ian King There are spelling mistakes in some dev_err messages. Fix these. Signed-off-by: Colin Ian King --- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c

[PATCH][next][V2] staging: wfx: fix a handful of spelling mistakes

2020-08-06 Thread Colin King
From: Colin Ian King There are various spelling mistakes in comments and error messages. Fix these. Signed-off-by: Colin Ian King --- V2: add in some more fixes as spotted by Randy Dunlap --- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_tx.c | 2 +-

[PATCH][next] staging: wfx: fix a handful of spelling mistakes

2020-08-05 Thread Colin King
From: Colin Ian King There are various spelling mistakes in comments and error messages. Fix these. Signed-off-by: Colin Ian King --- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/debug.c | 4 ++-- drivers/staging/wfx/hif_rx.c | 2 +-

[PATCH] staging: ion: fix spelling mistake in function name "detatch" -> "detach"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in the function name ion_dma_buf_detatch. Fix it by removing the extraneous t. Signed-off-by: Colin Ian King --- drivers/staging/android/ion/ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

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

2020-07-29 Thread Colin King
From: Colin Ian King The variable ret is being assigned an error return value that is never read, the control passes to a return statement and ret is never referenced. Remove the redundant assignment. Also remove an empty line. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King

[PATCH] staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc

2020-07-23 Thread Colin King
From: Colin Ian King The variables scsicmd_id and rc is being initialized with a value that is never read and are being updated later with a new value. The initializations are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH][next][V2] media: allegro: fix potential null dereference on header

2020-07-22 Thread Colin King
From: Colin Ian King The pointer header is an alias to msg and msg is being null checked. However, if msg is null then header is also null and this can lead to a null pointer dereference on the assignment type = header->type. Fix this just using header->type after the null check and removing the

[PATCH][next] media: allegro: fix potential null dereference on header

2020-07-20 Thread Colin King
From: Colin Ian King The pointer header is an alias to msg and msg is being null checked. However, if msg is null then header is also null and this can lead to a null pointer dereference on the assignment type = header->type. Fix this by only dereferencing header after the null check on msg.

[PATCH] staging: rtl8192u: fix a dubious looking mask before a shift

2020-07-16 Thread Colin King
From: Colin Ian King Currently the masking of ret with 0xff and followed by a right shift of 8 bits always leaves a zero result. It appears the mask of 0xff is incorrect and should be 0xff00, but I don't have the hardware to test this. Fix this to mask the upper 8 bits before shifting. [ Not

[PATCH] media: atomisp: fix mask and shift operation on ISPSSPM0

2020-07-16 Thread Colin King
From: Colin Ian King Currently the check on bits 25:24 on ISPSSPM0 is always 0 because the mask and shift operations are incorrect. Fix this by shifting by MRFLD_ISPSSPM0_ISPSSS_OFFSET (24 bits right) and then masking with RFLD_ISPSSPM0_ISPSSC_MASK (0x03) to get the appropriate 2 bits to check.

[PATCH][next] staging: wfx: fix uninitialized variable bytes_done

2020-07-06 Thread Colin King
From: Colin Ian King The variable bytes_done is not initialized and hence the first FIFO size check on bytes_done may be breaking prematurely from the loop if bytes_done contains a large bogus uninitialized value. Fix this by initializing bytes_done to zero. Addresses-Coverity: ("Uninitialized

[PATCH] media: atomisp: make const arrays static, makes object smaller

2020-06-11 Thread Colin King
From: Colin Ian King Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by 150 bytes. Before: textdata bss dec hex filename 111083 23692 64 134839 20eb7 atomisp/pci/atomisp_compat_css20.o After: textdata

[PATCH][next] media: atomisp: fix a handful of spelling mistakes

2020-05-21 Thread Colin King
From: Colin Ian King There are several spelling mistakes in various messages and literal strings. Fix these. Signed-off-by: Colin Ian King --- .../staging/media/atomisp/pci/base/refcount/src/refcount.c | 2 +- .../media/atomisp/pci/css_2401_system/host/csi_rx_private.h | 4 ++--

[PATCH] staging: fbtft: fb_st7789v: make HSD20_IPS numeric and not a string

2020-05-21 Thread Colin King
From: Colin Ian King Currently HSD20_IPS is defined as "true" and will always result in a non-zero result even if it is defined as "false" because it is an array and that will never be zero. Fix this by defining it as an integer 1 rather than a literal string. Addessses-Coverity: ("Array

[PATCH][next] staging: most: usb: sanity check channel before using it as an index into arrays

2020-05-07 Thread Colin King
From: Colin Ian King Currently channel is being sanity checked after it has been used as an index into some arrays. Fix this by moving the sanity check of channel before the arrays are indexed with it. Addresses-Coverity: ("Negative array index read") Fixes: 59ed0480b950 ("Staging: most:

[PATCH][next] staging: vt6656: remove redundant assignment to variable ed_inx

2020-04-14 Thread Colin King
From: Colin Ian King The variable ed_inx 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 ---

[PATCH] staging: gdm724x: remove redundant assignment to pointer 'w'

2020-04-05 Thread Colin King
From: Colin Ian King The pointer 'w' 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 ---

[PATCH] binderfs: remove redundant assignment to pointer ctx

2020-04-02 Thread Colin King
From: Colin Ian King The pointer ctx 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/binderfs.c | 2

[PATCH] staging: speakup: remove redundant initialization of pointer p_key

2020-02-23 Thread Colin King
From: Colin Ian King Pointer p_key is being initialized with a value that is never read, it is assigned a new value later on. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/speakup/keyhelp.c | 2 +- 1

[PATCH] staging: rtl8723bs: core: remove redundant zero'ing of counter variable k

2020-02-23 Thread Colin King
From: Colin Ian King The zero'ing of counter variable k is redundant as it is never read after breaking out of the while loop. Remove it. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_efuse.c | 4 +--- 1 file changed, 1 insertion(+),

[PATCH] staging: rtl8188eu: remove redundant assignment to cond

2020-02-23 Thread Colin King
From: Colin Ian King Variable cond 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/rtl8188eu/hal/rf_cfg.c | 2 +- 1 file

[PATCH] staging: rtl8723bs: remove temporary variable CrystalCap

2020-02-23 Thread Colin King
From: Colin Ian King Currently variable CrystalCap is being initialized with the value 0x20 that is never read so that is redundant and can be removed. Clean up the code by removing the need for variable CrystalCap since the calculation of the return value is relatively simple.

[PATCH] staging: rtl8192e: remove redundant initialization of variable init_status

2020-02-22 Thread Colin King
From: Colin Ian King The pointer init_status is being initialized with a value that is never read, it is being updated later on. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH] staging: rtl8723bs: fix copy of overlapping memory

2020-01-26 Thread Colin King
From: Colin Ian King Currently the rtw_sprintf prints the contents of thread_name onto thread_name and this can lead to a potential copy of a string over itself. Avoid this by printing the literal string RTWHALXT instread of the contents of thread_name. Addresses-Coverity: ("copy of overlapping

[PATCH] staging: comedi: drivers: fix spelling mistake "to" -> "too"

2020-01-22 Thread Colin King
From: Colin Ian King There is a spelling mistake in a deb_dbg message. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/comedi/drivers/das6402.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das6402.c

[PATCH] staging: qlge: fix spelling mistake "to" -> "too"

2020-01-22 Thread Colin King
From: Colin Ian King There is a spelling mistake in a netif_printk message. Fix it. Signed-off-by: Colin Ian King --- drivers/staging/qlge/qlge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index

[PATCH] staging: wlan-ng: ensure error return is actually returned

2020-01-14 Thread Colin King
From: Colin Ian King Currently when the call to prism2sta_ifst fails a netdev_err error is reported, error return variable result is set to -1 but the function always returns 0 for success. Fix this by returning the error value in variable result rather than 0. Addresses-Coverity: ("Unused

[PATCH][next] staging: wilc1000: remove redundant assignment to variable result

2020-01-14 Thread Colin King
From: Colin Ian King The variable result is being initialized with a value that is never read and is being re-assigned later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/wilc1000/spi.c | 4 ++--

[PATCH][next] staging: vt6655: remove redundant assignment to variable ret

2020-01-14 Thread Colin King
From: Colin Ian King The variable ret is being initialized with a value that is never read and is being re-assigned later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/vt6655/rf.c | 2 +- 1 file

[PATCH][next] staging: wfx: check for memory allocation failures from wfx_alloc_hif

2019-12-20 Thread Colin King
From: Colin Ian King Currently calls to wfx_alloc_hif are not checking for a null return when a memory allocation fails and this leads to null pointer dereferencing issues. Fix this by adding null pointer checks and returning passing down -ENOMEM errors where necessary. The error checking in

[PATCH] media: meson: add missing allocation failure check on new_buf

2019-12-04 Thread Colin King
From: Colin Ian King Currently if the allocation of new_buf fails then a null pointer dereference occurs when assiging new_buf->vb. Avoid this by returning early on a memory allocation failure as there is not much more can be done at this point. Addresses-Coverity: ("Dereference null return")

[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

[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

[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

[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

[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

[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

[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:

[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

[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

[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] 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

[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

[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

[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] 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

[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] 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][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.

[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

[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: 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:

[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

[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:

[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

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

[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

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

[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

[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

[PATCH] staging: rtl8188eu: remove redundant assignment to variable rtstatus

2019-07-31 Thread Colin King
From: Colin Ian King Variable rtstatus is being initialized with a value that is never read and rtstatus is being re-assigned a little later on. The assignment is redundant and hence can be removed. Also, make rtstatus a bool to match the function return type. Addresses-Coverity: ("Unused

[PATCH] staging: rtl8188eu: remove redundant assignment to rtstatus

2019-07-26 Thread Colin King
From: Colin Ian King Variable rtstatus 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/rtl8188eu/hal/rf_cfg.c | 2 +- 1 file

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

2019-07-23 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

[PATCH] drivers/staging/rtl8192u: fix indentation issue, remove extra tab

2019-07-23 Thread Colin King
From: Colin Ian King A statement is indented one level too deeply; clean this up by removing a tab. Signed-off-by: Colin Ian King --- drivers/staging/rtl8192u/r8192U_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_dm.c

[PATCH] staging: rtl8712: remove redundant assignment to variable res

2019-07-05 Thread Colin King
From: Colin Ian King The variable res 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 ---

[PATCH] staging: greybus: remove redundant assignment to variable is_empty

2019-07-04 Thread Colin King
From: Colin Ian King The variable is_empty 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 ---

[PATCH][next] staging: rtl8723bs: hal: remove redundant assignment to packetType

2019-07-03 Thread Colin King
From: Colin Ian King Local variable packetType is being assigned a value that is never read just before a return statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 1 -

[PATCH] staging: rtl8192e: remove redundant initialization of rtstatus

2019-07-02 Thread Colin King
From: Colin Ian King Variable rtstatus is being initialized with a value that is never read as it is being overwritten inside a do-while loop. Clean up the code by removing the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[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

[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

[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.

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

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

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

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

[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] 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: 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

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

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

[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

[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: 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

[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

[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

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

[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

  1   2   3   4   >