From: Colin Ian King
In the case where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP the
exit return path is via label next_rx_no_prod and cpr->rx_bytes
is being updated by an uninitialized value from len. Fix this by
initializing len to zero.
Detected by CoverityScan, CID#1463807 ("Uninitialized sca
From: Colin Ian King
Pointer esph is being assigned a value that is never read, esph is
re-assigned and only read inside an if statement, hence the
initialization is redundant and can be removed.
Cleans up clang warning:
net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during
its initiali
From: Colin Ian King
Currently the comparison of used < 0 is always false because
uses is a size_t. Fix this by making used a ssize_t type.
Detected by Coccinelle:
drivers/misc/ocxl/file.c:320:6-10: WARNING: Unsigned expression
compared with zero: used < 0
Fixes: 5ef3166e8a32 ("ocxl: Driver cod
From: Colin Ian King
The u8 variable max_size is being assigned a return value from the
call to nci_conn_max_data_pkt_payload_size that can return a -ve
error return. Since max_size is a u8, the -ve check for the error will
always be false. Fix this by making max_size an int type.
Detected using
From: Colin Ian King
The return from the call __ftm_clk_init can be negative if there
is an error, and this is being checked, however, the check is
always false because freq is unsigned. Fix this by removing the
unsigned type qualifier, making freq just a long.
Detected using Coccinelle:
driver
From: Colin Ian King
Pointer nd_mapping is being initialized to a value that is never read,
instead it is being updated to a new value in all the cases where it
is being read afterwards, hence the initialization is redundant and
can be removed.
Cleans up clang warning:
drivers/nvdimm/namespace_d
From: Colin Ian King
Pointer q is initialized and then almost immediately afterwards being
re-assigned the same value. Remove the second redundant assignment.
Cleans up clang warning:
drivers/net/wireless/zydas/zd1211rw/zd_mac.c:503:23: warning: Value
stored to 'q' during its initialization is n
From: Colin Ian King
Trivial fix to spelling mistake in debug error message text.
Signed-off-by: Colin Ian King
---
drivers/net/wireless/ath/wil6210/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wil6210/main.c
b/drivers/net/wireless/ath/wi
From: Colin Ian King
Trivial fix to spelling mistake in pr_err error message text.
Signed-off-by: Colin Ian King
---
arch/x86/kernel/cpu/bugs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 3bfb2b23d79c..fa1aaf
From: Colin Ian King
Variable head is initialized to a value that is never read and is
being updated to a new value a few lines later, hence this
initialization is redundant and can be safely removed as well
as the now unused pointer txq.
Cleans up clang warning:
drivers/net/ethernet/emulex/bene
From: Colin Ian King
Currently an out of range dev->nr is detected by just reporting the
issue and later on an out-of-bounds read on array card occurs because
of this. Fix this by checking the upper range of dev->nr with the size
of array card (removes the hard coded size), move this check earlie
From: Colin Ian King
Pointer rxdesc is assigned a value that is never read, it is overwritten
by a new assignment inside a while loop hence the initial assignment
is redundant and can be removed.
Cleans up clang warning:
drivers/net/ethernet/jme.c:1074:17: warning: Value stored to 'rxdesc'
durin
From: Colin Ian King
Pointer phydev is initialized and this value is never read, phydev
is immediately updated to a new value, hence this initialization
is redundant and can be removed
Cleans up clang warning:
drivers/net/usb/lan78xx.c:2009:21: warning: Value stored to 'phydev'
during its initia
From: Colin Ian King
Pointer rq is being initialized but this value is never read, it
is being updated inside a for-loop. Remove the initialization and
move it into the scope of the for-loop.
Cleans up clang warning:
drivers/net/vmxnet3/vmxnet3_drv.c:2763:27: warning: Value stored
to 'rq' during
From: Colin Ian King
Pointer tq is initialized with &ah->ah_txq[queue] and then a few
lines later is re-assigned the same value, hence this duplicate
assignment is redundant and can be removed.
Cleans up clang warning:
drivers/net/wireless/ath/ath5k/qcu.c:326:25: warning: Value stored
to 'tq' du
From: Colin Ian King
Variable dma is initialized with a value that is never read, later
on it is re-assigned a new value, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:584:13: warning: Value
stored to 'dma' du
From: Colin Ian King
Trivial fix to spelling mistakes in dev_err error message text.
Signed-off-by: Colin Ian King
---
drivers/mtd/nand/marvell_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index b8f
From: Colin Ian King
Variable oob_len is assigned and never read, hence it is redundant and
can be removed.
Cleans up clang warnings:
drivers/mtd/nand/marvell_nand.c:1356:6: warning: Value stored to 'oob_len'
during its initialization is never read
drivers/mtd/nand/marvell_nand.c:1369:4: warnin
From: Colin Ian King
Pointer bdev is being initialized however this value is never
read as bdev is assigned an updated value from the returned
call to blkdev_get_by_path. Remove the redundant assignment.
Cleans up clang warning:
drivers/mtd/devices/block2mtd.c:228:23: warning: Value stored to
'
From: Colin Ian King
Clang detected two redundant assignments that can be safely removed.
The first is the removal of the duplicated assignment to pointer 'hdr',
this has already been initialized with the same value. The second is
the removal of the redundant initialization of variable 'timeout'
From: Colin Ian King
The value stored to rfPath during initialization is never read, the
following switch statement re-assigns it a new value on all the
case and default paths. Hence the initialization is redundant and
can be removed.
Cleans up clang warning:
drivers/staging/rtl8712/rtl871x_mp.c
From: Colin Ian King
Currently there is a memory leak on buf when the call to ntb_mw_get_align
fails. Add an exit err label and jump to this so that kfree on buf frees
the memory.
Detected by CoverityScan, CID#1464286 ("Resource leak")
Fixes: d637628ce00c ("NTB: ntb_tool: Add full multi-port N
From: Colin Ian King
Currently, if the call to devlink_resource_find returns null then
the error exit path does not free the devlink_resource 'resource'
and a memory leak occurs. Fix this by kfree'ing resource on the
error exit path.
Detected by CoverityScan, CID#1464184 ("Resource leak")
Fixes
From: Colin Ian King
The pointer pfrm is initialized and then later re-assigned the same
value and hence the second assignment is redundant and can be removed.
Cleans up clang warning:
drivers/net/caif/caif_hsi.c:222:6: warning: Value stored to 'pfrm'
during its initialization is never read
Sig
From: Colin Ian King
Variable timeout is initialized however this value is never read and
it is reassigned a new value a little later, hence the initialization
is redundant and can be removed.
Cleans up clang warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1728:6: warning:
Value
From: Colin Ian King
A previous commit no longer stores the contents of c, so we now have
a situation where c is being updated but the value is never read. Clean
up the code by removing the now redundant setting of variable c.
Cleans up clang warning:
drivers/scsi/aacraid/aachba.c:943:3: warning
From: Colin Ian King
The initialization of d is redundant as this value is never read
and it is overwritten inside the subsequent for-loop. Remove this
redundant assignment.
Cleans up clang warning:
drivers/scsi/qla2xxx/qla_gs.c:3985:29: warning: Value stored to 'd'
during its initialization is
From: Colin Ian King
Don't populate the const read-only array 'buf' on the stack but instead
make it stati. Makes the object code smaller by 26 bytes:
Before:
textdata bss dec hex filename
143782384 64 1682641ba linux/drivers/hid/hid-asus.o
After:
text
From: Colin Ian King
Don't populate the const read-only array 'cmd' on the stack but instead
make it static. Makes the object code smaller by 38 bytes:
Before:
textdata bss dec hex filename
4950 868 0581816ba fimc-is-regs.o
After:
textdata bss
From: Colin Ian King
Don't populate the const read-only array 'req' on the stack but instead
make it static. Makes the object code smaller by over 40 bytes:
Before:
textdata bss dec hex filename
84973408 128 120332f01 linux/drivers/bluetooth/bpa10x.o
After:
From: Colin Ian King
Don't populate the const read-only array 'param' on the stack but instead
make it static. Makes the object code smaller by nearly 20 bytes:
Before:
textdata bss dec hex filename
116052629 64 1429837da linux/drivers/bluetooth/btintel.o
Aft
From: Colin Ian King
Don't populate the const read-only array 'int_reg' on the stack but instead
make it static. Makes the object code smaller by over 80 bytes:
Before:
textdata bss dec hex filename
280248936 192 371529120 drivers/gpu/ipu-v3/ipu-common.o
After
From: Colin Ian King
Use the ARRAY_SIZE macro on various arrays to determine
size of the arrays. Improvement suggested by coccinelle.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/intel/ixgbevf/vf.c | 17 +++--
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a
From: Colin Ian King
Use the ARRAY_SIZE macro on array __pciids to determine size of the array.
Improvement suggested by coccinelle.
Signed-off-by: Colin Ian King
---
drivers/scsi/bfa/bfa_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/bfa/bfa_core.c b/d
From: Colin Ian King
Use the ARRAY_SIZE macro on array buf to determine size of the array.
Improvement suggested by coccinelle.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethern
From: Colin Ian King
Use the ARRAY_SIZE macro on array cmd_priv_map to determine size of the
array. Improvement suggested by coccinelle.
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ne
From: Colin Ian King
Use the ARRAY_SIZE macro on array seg6_action_table to determine size of
the array. Improvement suggested by coccinelle.
Signed-off-by: Colin Ian King
---
net/ipv6/seg6_local.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/seg6_local.c b/net/
From: Colin Ian King
Trivial fix to spelling mistakes in pr_debug message text.
Signed-off-by: Colin Ian King
---
tools/perf/util/bpf-loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 72c107fcbc5a..806
From: Colin Ian King
The initialization of PwrCfgCmd is redundant as the value is never read
and it is being re-assigned to PwrSeqCmd[AryIdx] inside a loop, hence
it can be removed. Also, the initialization of ie_ptr is redundant as
the value is never read and it is being re-assigned in either p
From: Colin Ian King
The initialization of cfg_cmd is redundant as the value is never read
and it is being re-assigned to cfg_cmd = pwrcfgcmd[ary_idx] inside a
loop, hence it can be removed.
Cleans up clang warning:
drivers/staging/rtlwifi/core.c:1819:22: warning: Value stored to
'cfg_cmd' durin
From: Colin Ian King
There are various assignments that are being made to variables that are
not read and the variables are being updated later on, hence the redundant
assignments can be removed.
Cleans up clang warnings:
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:1950:8:
warning:
From: Colin Ian King
Pointer dev is initialized and then re-assigned with the same value
a little later, hence the second assignment is redundant and can be
removed.
Cleans up clang warning:
drivers/usb/wusbcore/wa-nep.c:88:17: warning: Value stored to 'dev'
during its initialization is never re
From: Colin Ian King
Pointer tv_nexus is being initialized a value and this is never read
and is later being updated with the same value. Remove the redundant
initialization so that the assignment to tv_nexus is performed later
and more local to when it is being read.
Cleans up clang warning:
dr
From: Colin Ian King
Use vzalloc instead of the vmalloc, memset combo
Signed-off-by: Colin Ian King
---
fs/orangefs/devorangefs-req.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index f073cd9e6687..a50fb896
From: Colin Ian King
Pointer hidpp is being assigned twice with the same value, remove
the second occurrance as it is redundant.
Cleans up clang warning:
drivers/hid/hid-logitech-hidpp.c:177:23: warning: Value stored to
'hidpp' during its initialization is never read
Signed-off-by: Colin Ian Ki
From: Colin Ian King
The pointer reg is assigned a value that is never read, it is later
overwritten with a new value, hence the redundant initialization can
be removed.
Cleans up clang warning:
drivers/i2c/busses/i2c-stm32f4.c:352:16: warning: Value stored to 'reg'
during its initialization is
From: Colin Ian King
Pointer cursg is initialized to cmd->cursg and again re-assigned the
same value a few lines later, hence the second assignment is redundant
and can be removed.
Cleans up clang warning:
drivers/ide/ide-taskfile.c:229:22: warning: Value stored to 'cursg'
during its initializat
From: Colin Ian King
The pointer head is re-assigned the same value twice, so remove the
second redundant assignment.
Cleans up clang warning:
drivers/message/fusion/mptsas.c:1161:20: warning: Value stored to 'head'
during its initialization is never read
Signed-off-by: Colin Ian King
---
dri
From: Colin Ian King
Node is assigned twice to rb_first(root), first during declaration
time and second after a taking a spin lock, so we have a duplicated
assignment. Remove the first assignment because it is redundant and
also not protected by the spin lock.
Cleans up clang warning:
fs/cifs/c
From: Colin Ian King
The second assignment to res is identical to the previous assignment
so it is redundant and can be removed.
Cleans up clang warning:
sound/soc/intel/skylake/skl-topology.c:191:25: warning: Value stored to
'res' during its initialization is never read
Signed-off-by: Colin Ia
From: Colin Ian King
The variable pwr_cmd is being assigned to cyapa->suspend_power_mode
twice, once during the declaration and once after taking an
interruptible mutex lock. Remove the redundant first assignment
since the value is never read and it is outside the mutex lock.
Cleans up clang wa
From: Colin Ian King
The function mlxsw_sp_kvdl_part_occ is local to the source and does
not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol 'mlxsw_sp_kvdl_part_occ' was not declared. Should it be static?
Signed-off-by: Colin Ian King
---
drivers/net/ethernet/
From: Colin Ian King
The function its_fsl_mc_msi_init is local to the source and does
not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol 'its_fsl_mc_msi_init' was not declared. Should it be static?
Signed-off-by: Colin Ian King
---
drivers/staging/fsl-mc/bus/i
From: Colin Ian King
The functions devlink_resource_find and devlink_resource_validate_children
are local to the source and do not need to be in global scope, so make
them static.
Cleans up sparse warnings:
symbol 'devlink_resource_find' was not declared. Should it be static?
warning: symbol 'de
From: Colin Ian King
The pointer mos_parport is being initialized to pp->private_data and
then the assignment is duplicated after a spin lock. Remove the
initialization as it occurs before the spin lock and it is a redundant
assignment.
Cleans up clang warnings:
drivers/usb/serial/mos7720.c:521
From: Colin Ian King
Variable opc is initialized with a value that is never read, opc
is later re-assigned a newer value, hence the initialization can
be removed.
Cleans up clang warning:
drivers/mmc/host/sh_mmcif.c:919:6: warning: Value stored to 'opc'
during its initialization is never read
S
From: Colin Ian King
Add a missing void parameter to function btrfs_test_extent_map, fixes
sparse warning:
warning: non-ANSI function declaration of function 'btrfs_test_extent_map'
Signed-off-by: Colin Ian King
---
fs/btrfs/tests/extent-map-tests.c | 2 +-
1 file changed, 1 insertion(+), 1 d
From: Colin Ian King
The functions pll_event and dac_event are local to the source and do
not need to be in global scope, so make them static.
Cleans up sparse warnings:
symbol 'pll_event' was not declared. Should it be static?
symbol 'dac_event' was not declared. Should it be static?
Signed-of
From: Colin Ian King
The initial assignment to mdev is redundant as mdev is re-assigned
later and the first assigned value is never read. Remove this
redundant assignment.
Cleans up clang warning:
drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored
to 'mdev' during its initialization
From: Colin Ian King
Variable fw_ps_state is assigned a value but it is never read, hence
it is redundant and can be removed.
Cleans up clang warning:
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:736:2:
warning: Value stored to 'fw_ps_state' is never read
Signed-off-by: Colin I
From: Colin Ian King
Casting a value returned by memory an allocation function is
not required and can be removed. Also add in a newline after before
the first statement. Code clean up as suggested by coccinelle.
Signed-off-by: Colin Ian King
---
drivers/staging/ncpfs/inode.c | 3 ++-
1 file c
From: Colin Ian King
Trivial fix to spelling mistake in error message text.
Signed-off-by: Colin Ian King
---
kernel/bpf/verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 97bbef3eecdf..e388f30c4168 100644
--- a/ke
From: Colin Ian King
Currently in the cases where cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP or
CMP_TYPE_RX_L2_TPA_END_CMP the exit path updates cpr->rx_bytes with an
uninitialized length len. Fix this by adding a new exit path that does
not update the cpr stats with the bogus length len and remov
From: Colin Ian King
Trivial fix to spelling mistakes in dev_err error message text.
Signed-off-by: Colin Ian King
---
drivers/mtd/nand/marvell_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index b8f
From: Colin Ian King
The initialized value stored in pointer desc is never read as it
is updated in the first executable statement in the function.
This is therefore redundant and can be removed.
Cleans up clang warning:
drivers/gpio/gpiolib.c:3710:20: warning: Value stored to 'desc'
during its
From: Colin Ian King
Variable pool is being assigned zero and then in the following for-loop
is it being set to zero again. Remove the redundant first assignment.
Cleans up clang warning:
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c:61:2: warning: Value stored
to 'pool' is never read
Signed-off
From: Colin Ian King
Variable sg_off is assigned a value but it is never read, hence it is
redundant and can be removed.
Cleans up clang warning:
net/rds/message.c:373:2: warning: Value stored to 'sg_off' is never read
Signed-off-by: Colin Ian King
---
net/rds/message.c | 2 --
1 file changed
From: Colin Ian King
Function lan743x_phy_init assigns pointer 'netdev' but this is never read
and hence it can be removed. The return error code handling can also be
cleaned up to remove the variable 'ret'.
Function lan743x_phy_link_status_change assigns pointer 'phy' twice and
this is never re
From: Colin Ian King
Functions lan743x_csr_read and lan743x_csr_read are local to the source
and do not need to be in global scope, so make them static.
Cleans up sparse warning:
drivers/net/ethernet/microchip/lan743x_main.c:56:5: warning: symbol
lan743x_csr_read' was not declared. Should it be
From: Colin Ian King
Functions rds_info_from_znotifier and rds_message_zcopy_from_user are
local to the source and do not need to be in global scope, so make them
static.
Cleans up sparse warnins:
net/rds/message.c:70:27: warning: symbol 'rds_info_from_znotifier' was
not declared. Should it be s
From: Colin Ian King
Trivial fix to spelling mistake in gvt_err error message text.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/gvt/gtt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 0a100a2
From: Colin Ian King
The pointer 'pipe' is being initialized with a value that is never
read and it is re-assigned later, hence the initialization is redundant
and can be removed. Also remove pointer 'runtime' as it is no longer
required.
Cleans up clang warning:
sound/pci/echoaudio/echoaudio.c:
From: Colin Ian King
The variable 'len' is being initialized with a value that is never
read and it is re-assigned later, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
net/rxrpc/recvmsg.c:275:15: warning: Value stored to 'len' during its
initialization is nev
From: Colin Ian King
Variable 'val' is initialized with a value that is never read, it is
updated with a new value again after intitialization. Remove the
redundant initialization and move the declaration and assignment into
the scope of the for-loop.
Cleans up clang warning:
drivers/staging/com
From: Colin Ian King
The function mvpp2_check_hw_buf_num is local to the source and does
not need to be in global scope, so make it static.
Cleans up sparse warning:
drivers/net/ethernet/marvell/mvpp2.c:4298:5: warning: symbol
'mvpp2_check_hw_buf_num' was not declared. Should it be static?
Sign
From: Colin Ian King
The macros for __PHYDMKFREE_H__ and __PHYDM_FEATURES_H__ contain
typos and don't match the #if guard check. Defined them correctly.
Cleans up clang warnings:
warning: '__PHYDMKFREE_H__' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]
From: Colin Ian King
In the case where hard_iface is NULL, the error path may pass a null
pointer to batadv_hardif_put causing a null pointer dereference error.
Avoid this by only calling the function if hard_iface not null.
Detected by CoverityScan, CID#1466456 ("Explicit null dereferenced")
From: Colin Ian King
Currently variable size is a unsigned size_t, hence comparisons to
see if it is less than zero (for error checking) will always be
false. Fix this by making size a ssize_t
Detected by CoverityScan, CID#1466080 ("Unsigned compared against 0")
Fixes: 8e51f9087f40 ("apparmor:
From: Colin Ian King
The call to rmnet_get_endpoint can potentially return NULL so check
for this to avoid any subsequent null pointer dereferences on a NULL
ep.
Detected by CoverityScan, CID#1465385 ("Dereference null return value")
Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configur
From: Colin Ian King
The macros for __PHYDMKFREE_H__ and __PHYDM_FEATURES_H__ contain
typos and don't match the #if guard check. Defined them correctly.
Cleans up clang warnings:
warning: '__PHYDMKFREE_H__' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]
From: Colin Ian King
The call to nla_nest_start calls nla_put which can lead to a NULL
return so it's possible for attr to become NULL and we can potentially
get a NULL pointer dereference on attr. Fix this by checking for
a NULL return.
Detected by CoverityScan, CID#1466125 ("Dereference null
From: Colin Ian King
Currently result is not initialized, so it contains a garbage value and
this is or'd with data from vega10_program_didt_config_registers() which
can end up with a non-zero value when the result should be zero. Fix
this by ensuring result is initialized to zero.
Detected by
From: Colin Ian King
The current for-loop zeros variable i and only loops once, hence
not all the buffers are free'd. Fix this by setting i correctly.
Detected by CoverityScan, CID#1463415 ("Operands don't affect result")
Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08")
Signed-off-by:
From: Colin Ian King
Replace several allocation and memcpys with kmemdup and add in some
missing memory allocation failure checks. Also fix an incorrect
-EFAULT return with -ENOMEM.
Signed-off-by: Colin Ian King
---
drivers/staging/wilc1000/host_interface.c | 75 +++--
From: Colin Ian King
Trivial fix to spelling mistake in pr_warn warning message text
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
b/drivers/gpu/dr
From: Colin Ian King
The host structure is not being kfree'd on two error exit paths
leading to memory leaks. Add in new err_free label and kfree host.
Detected by CoverityScan, CID#1466103 ("Resource leak")
Fixes: 2623c7a5f279 ("libata: add refcounting to ata_host")
Signed-off-by: Colin Ian Ki
From: Colin Ian King
Currently on the error exit path the allocated buffer is not free'd
causing a memory leak. Fix this by kfree'ing it.
Detected by CoverityScan, CID#1466876 ("Resource leaks")
Fixes: 1180b4c757aa ("apparmor: fix dangling symlinks to policy rawdata after
replacement")
Signed-
From: Colin Ian King
The current error handling for failed resource setup for xdp_ring
data is a break out of the loop and returning 0 indicated everying
was OK, when in fact it is not. Fix this by exiting via the
error exit label err_setup_tx that will clean up the resources
correctly and retur
From: Colin Ian King
With the current exit return path of the ctl_info allocation failure
cval is not being freed resulting in a memory leak. Fix this by kfree'ing
it on the return.
Detected by CoverityScan, CID#1466878 ("Resource Leak")
Fixes: 21e9b3e931f7 ("ALSA: usb-audio: fix uac control qu
From: Colin Ian King
Currently the masking of the ili_fields is using the ! operator which
results in masking with 0, which clears all the bits which is not
intended. Instead, use the ~ operator that negates the inverts the
bits to correctly mask out the XFS_ILOG_AOWNER and XFS_ILOG_DOWNER
bits.
From: Colin Ian King
Currently chip is being dereferenced by the call to dev_get_drvdata
before it is being null checked, hence we have a potential null
pointer dereference bug. Fix this by only dereferencing it after the
null check.
Detected by CoverityScan, CID#1357806 ("Dereference before nul
From: Colin Ian King
Currently chip is being dereferenced by the call to dev_get_drvdata
before it is being null checked, however, chip can never be null, so
this check is misleading and redundant. Remove it.
Detected by CoverityScan, CID#1357806 ("Dereference before null check")
Signed-off-by:
From: Colin Ian King
There is a double assignment to cdev->ports, the first is redundant
as it is over-written so remove it.
Detected by CoverityScan, CID#1467432 ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/crypto/chelsio/chtls/chtls_main.c | 1 -
1 file changed, 1 deletion(-)
From: Colin Ian King
Trivial fix to spelling mistake in fnic stats message text
Signed-off-by: Colin Ian King
---
drivers/scsi/fnic/fnic_trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index abddde11982
From: Colin Ian King
The subtraction of two struct ieee80211_wmm_rule pointers leaves a result
that is automatically scaled down by the size of the size of pointed-to
type, hence the division by sizeof(struct ieee80211_wmm_rule) is
bogus and should be removed.
Detected by CoverityScan, CID#14677
From: Colin Ian King
Shifting 1 (a 32 bit signed int) more than 32 places will overflow
the int, so explicitly use 1ULL to avoid this overflow.
Detected by CoverityScan, CID#1467808 ("Uninitentional integer overflow")
Fixes: 63a4681ff39c ("afs: Locally edit directory data for
mkdir/create/unli
From: Colin Ian King
In the case where the call to dev_alloc_name fails the current exit
path is via err_free_netdev and this calls free_netdev on a null priv
pointer, hence causing a null pointer dereference. Fix this by instead
exiting via err_release_irq.
Detected by CoverityScan, CID#146784
From: Colin Ian King
Trivial fix to spelling mistake in dev_err error message text
Signed-off-by: Colin Ian King
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
b/drivers/dma/
From: Colin Ian King
Array mvpp2_pools is being indexed by long_log_pool, however this
looks like a cut-n-paste bug and in fact should be short_log_pool.
Detected by CoverityScan, CID#1466113 ("Copy-paste error")
Fixes: 576193f2d579 ("net: mvpp2: jumbo frames support")
Signed-off-by: Colin Ian
From: Colin Ian King
The error return code is not being assigned to ret from the call
to clk_prepare_enable and consequently the current check on ret
picks up the previous error return. Fix this by adding in the
missing assignment to ret.
Detected by CoverityScan, CID#166020 ("Logically Dead cod
301 - 400 of 3617 matches
Mail list logo