From: Colin Ian King colin.k...@canonical.com
Passing a NULL id causes a NULL pointer deference in writers
such as erst_writer and efi_pstore_write because they expect
to update this id. Pass a dummy id instead.
This avoids a cascade of oopses caused when the initial
pstore_console_write passes
From: Colin Ian King colin.k...@canonical.com
Passing a NULL id causes a NULL pointer deference in writers
such as erst_writer and efi_pstore_write because they expect
to update this id. Pass a dummy id instead.
This avoids a cascade of oopses caused when the initial
pstore_console_write passes
From: Colin Ian King colin.k...@canonical.com
ACPI_ERROR() already appends a newline, so there is no
need for the error messages to include one too.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/acpi/video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
From: Colin Ian King colin.k...@canonical.com
ACPI_EXCEPTION() already appends a newline, so there is no
need for the invalid GPE message to include one too.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/acpi/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Colin Ian King colin.k...@canonical.com
ACPI_EXCEPTION() already appends a newline, so there is no
need for the thermal trip point message to include one too.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/acpi/thermal.c | 2 +-
1 file changed, 1 insertion(+), 1
From: Colin Ian King colin.k...@canonical.com
ACPI_ERROR() already appends a newline, so there is no
need for the error messages to include one too.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/acpi/acpica/hwgpe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
From: Colin Ian King colin.k...@canonical.com
The ACPI_EXCEPTION and ACPI_ERROR macros already emit a newline after
the message, so remove the unnecessary newlines from a bunch of messages.
Colin Ian King (5):
ACPI dock: remove unnecessary newline from exception message
ACPI video: remove
From: Colin Ian King colin.k...@canonical.com
ACPI_EXCEPTION() already appends a newline, so there is no
need for the failed _DCK messaged to include one too.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/acpi/dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Colin Ian King colin.k...@canonical.com
__perf_evsel__read_on_cpu() only bails out with -ENOMEM if
evsel-counts is NULL and perf_evsel__alloc_counts() has returned
an error. If perf_evsel__alloc_counts() does not return an error
we get an NULL pointer deference on evsel-counts-cpu[cpu]
if
From: Colin Ian King colin.k...@canonical.com
BugLink: http://bugs.launchpad.net/bugs/962038
Right now using pcie_aspm=force will not enable ASPM if the FADT indicates
ASPM is unsupported. However, the semantics of force should probably allow
for this, especially as they did before the ASPM
From: Colin Ian King colin.k...@canonical.com
cppcheck reports an array out of bounds access:
[drivers/media/dvb-frontends/ds3000.c:619]: (error) Array
'dvbs2_snr_tab[80]' accessed at index 80, which is out of bounds.
the index check is off by one, so fix this to avoid the error.
From: Colin Ian King colin.k...@canonical.com
A failed msgget causes the test to return an uninitialised value
in ret. Assign ret to -errno on error exit.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
tools/testing/selftests/ipc/msgque.c | 1 +
1 file changed, 1 insertion(+)
diff
From: Colin Ian King colin.k...@canonical.com
A failed msgget causes the test to return an uninitialised value
in ret. Assign ret to -errno on error exit.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
tools/testing/selftests/ipc/msgque.c | 1 +
1 file changed, 1 insertion(+)
diff
From: Colin Ian King colin.k...@canonical.com
cppcheck detected an incorrect assignment:
drivers/regulator/da9063-regulator.c:711]: (warning) Assignment
of function parameter has no effect outside the function
the original code didn't do anything, instead, *da9063_reg_matches
needs to be set
From: Colin Ian King colin.k...@canonical.com
Bar type OCTEON_DMA_BAR_TYPE_SMALL assigns lo and hi addresses and
then falls through to OCTEON_DMA_BAR_TYPE_BIG that re-assignes lo and
hi addresses with totally different values. Add a break so we don't
fall through.
Signed-off-by: Colin Ian King
From: Colin Ian King colin.k...@canonical.com
ch_clk was erroneously being allocated the incorrect size which
can be problematic for larger sizes of tll-nch
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/mfd/omap-usb-tll.c | 2 +-
1 file changed, 1 insertion(+), 1
From: Colin Ian King colin.k...@canonical.com
Static analysis from cppcheck issued the following warning:
[drivers/mfd/omap-usb-tll.c:255]: (warning) Found calculation
inside sizeof().
The current size calculation is not obvious and is easy to
miscomprehend, so re-work the size of the
From: Colin Ian King colin.k...@canonical.com
Commit 297e0dad7 introduced a bug where is_mcast is now
no longer initiialised on the non-multicast condition and so
it can be any random value from the stack. This issue was
detected by cppcheck:
[drivers/infiniband/hw/mlx4/ah.c:103]: (error)
From: Colin Ian King colin.k...@canonical.com
static code analysis from cppcheck reports:
[drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:322]:
(error) Uninitialized variable: packet_beacon
packet_beacon is not initialized and hence packet_beacon
contains garbage from the stack, so set it to
From: Colin Ian King colin.k...@canonical.com
cppcheck detected a memory leak:
[drivers/clk/st/clkgen-pll.c:525]: (error) Memory leak: gate
free gate on div allocation failure return path.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/clk/st/clkgen-pll.c | 4 +++-
1 file
From: Colin Ian King colin.k...@canonical.com
commit a183da63 introduced a new error return path that does
not kfree icst if the kmemdup of desc-params fails.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/clk/versatile/clk-icst.c | 1 +
1 file changed, 1 insertion(+)
diff
From: Colin Ian King colin.k...@canonical.com
Fix warning: drivers/usb/misc/usb3503.c:195:11: warning: 'err'
may be used uninitialized in this function [-Wmaybe-uninitialized]
err is not initialized, the error return should be PTR_ERR(clk)
Signed-off-by: Colin Ian King
From: Colin Ian King colin.k...@canonical.com
Smatch detected two memory leaks on saved_ec:
drivers/acpi/ec.c:1070 acpi_ec_ecdt_probe() warn: possible
memory leak of 'saved_ec'
drivers/acpi/ec.c:1109 acpi_ec_ecdt_probe() warn: possible
memory leak of 'saved_ec'
Free saved_ec on these two
From: Colin Ian King colin.k...@canonical.com
Originally found by cppcheck:
[arch/arm64/crypto/sha2-ce-glue.c:153]: (warning) Assignment of
function parameter has no effect outside the function. Did you
forget dereferencing it?
Updating data by blocks * SHA256_BLOCK_SIZE at the end of
From: Colin Ian King colin.k...@canonical.com
commit 4df38926f337 (UBI: block: Avoid disk size integer overflow)
introduced a dereference on dev (which is not initialized at that
point) when printing a warning message. Re-order disk_capacity check
after the dev is found.
Found by cppcheck:
From: Colin Ian King colin.k...@canonical.com
commit 4df38926f337 (UBI: block: Avoid disk size integer overflow)
introduced a dereference on dev (which is not initialized at that
point) when printing a warning message. Remove the reference to
the dev's disk_name.
Found by cppcheck:
From: Colin Ian King colin.k...@canonical.com
cppcheck detected an incorrect assignment:
[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:903]: (warning) Assignment
of function parameter has no effect outside the function. Did you
forget dereferencing it?
the original assigment didn't do anything,
From: Colin Ian King colin.k...@canonical.com
The DSP_NEVER_DEFINED #ifdef is confusing, it slips in an
extra } which is not required because the previous code is
indented incorrectly. Correct the identation and remove the
extraneous DSP_NEVER_DEFINED
Signed-off-by: Colin Ian King
From: Colin Ian King colin.k...@canonical.com
The current enqueuing does not trigger an alarm if there are any
expired timers on the timerqueue. This can occur when a RTC wake alarm
is used to wake a machine out of hibernate and the resumed state has
old expired timers that have not been removed
From: Colin Ian King colin.k...@canonical.com
cppcheck found the following issue:
(warning) Logical conjunction always evaluates to false:
alloc_len 4 alloc_len 65535.
..the test should be instead:
if (alloc_len 4 || alloc_len 65536)
This error was introduced by recent commit
From: Colin Ian King colin.k...@canonical.com
There is old, unused code that is #defined out by the
use of NOTMOS7840 and NOTMCS7840 - these are not
defined anywhere.
If NOTMOS7840 is defined then the code will break on null
pointer dereferences on mos7840_port. So the code is
currently unused,
From: Colin Ian King colin.k...@canonical.com
cppcheck on lines 917 and 977 show an ineffective assignment
to the dma buffer pointer:
[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:917]:
[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:977]:
(warning) Assignment of function parameter has no effect
outside
From: Colin Ian King colin.k...@canonical.com
Recent commit 80fa93fce37d3490f
(cxl: Name interrupts in /proc/interrupt) introduced a
redundant increment of hwirq which is not used or even
initialised at the point it is incremented. Detected by
cppcheck:
[drivers/misc/cxl/irq.c:439]: (error)
From: Colin Ian King colin.k...@canonical.com
Although on some systems va_end is a no-op, it is good practice
to use va_end, especially since the manual states:
Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function.
Signed-off-by: Colin Ian
From: Colin Ian King colin.k...@canonical.com
There is old, unused code that is #defined out by the
use of NOTMOS7840 - this is not defined anywhere. If
NOTMOS7840 is defined then the code will break on null
pointer dereferences on mos7840_port. So the code is
currently unused, and broken
From: Colin Ian King colin.k...@canonical.com
The else if check condition checks for the opposite of the
if check, hence the else if check is redundant and can be
replaced with a simple else:
if (rtlpriv-rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
..
} else if (rtlpriv-rtlhal.macphymode
From: Colin Ian King colin.k...@canonical.com
hwirq has not been initialized, however it is being incremented
and also not being referenced in a loop. This error was detected with
cppcheck:
[drivers/misc/cxl/irq.c:439]: (error) Uninitialized variable: hwirq
Commit 80fa93fce37d (cxl: Name
From: Colin Ian King colin.k...@canonical.com
Minor style issue, statement needs an extra tab indentation
on the if statement.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
sound/usb/usx2y/usbusx2yaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Colin Ian King colin.k...@canonical.com
Building with clang:
CC arch/x86/kernel/rtc.o
arch/x86/kernel/rtc.c:173:29: warning: duplicate 'const' declaration
specifier [-Wduplicate-decl-specifier]
static const char * const const ids[] __initconst =
Remove the duplicate
From: Colin Ian King colin.k...@canonical.com
[drivers/video/fbdev/broadsheetfb.c:673]:
(error) Memory leak: sector_buffer
sector_buffer is not being kfree'd on each call to
broadsheet_spiflash_rewrite_sector(), so free it.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
From: Colin Ian King colin.k...@canonical.com
when running low on memory I noticed rtlwifi was producing a large
quantity of repeated skb allocation failures messages. This should
be ratelimited to reduce the noise.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
From: Colin Ian King colin.k...@canonical.com
cppcheck detected an unitialised ret:
[drivers/base/power/clock_ops.c:53]: (error) Uninitialized variable: ret
ret is only assigned if ce-status PCE_STATUS_ERROR, if this is false
then __pm_clk_enable returns whatever garbage ret picks up from the
From: Colin Ian King colin.k...@canonical.com
smatch detected the following issue:
drivers/net/can/usb/gs_usb.c:904 gs_usb_probe() error:
potential null dereference 'dev'. (kzalloc returns null)
Add a check for null return from kzalloc and return -ENOMEM
Signed-off-by: Colin Ian King
From: Colin Ian King colin.k...@canonical.com
Fix typo, flaged - flagged
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/pinctrl/sirf/pinctrl-sirf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c
From: Colin Ian King colin.k...@canonical.com
Fix spelling mistake, aquire - acquire and missing newline (as
spotted by Joe Perches.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/dma/s3c24xx-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Colin Ian King colin.k...@canonical.com
Fix typo, intialization - initialization
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/crypto/atmel-aes.c | 2 +-
drivers/crypto/atmel-sha.c | 2 +-
drivers/crypto/atmel-tdes.c | 2 +-
3 files changed, 3 insertions(+), 3
From: Colin Ian King colin.k...@canonical.com
Fix spelling mistake, aquire - acquire
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/dma/s3c24xx-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c
From: Colin Ian King colin.k...@canonical.com
Fix typo, Intialization - Initialization
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c
From: Colin Ian King colin.k...@canonical.com
Fix typo, flaged - flagged
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/pinctrl/sirf/pinctrl-sirf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c
From: Colin Ian King colin.k...@canonical.com
Fix typo, Unkown - Unknown
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/mtd/nand/atmel_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
From: Colin Ian King colin.k...@canonical.com
cppcheck detected a buffer overflow:
[drivers/net/wireless/ath/wil6210/debugfs.c:634]: (error) Width 8
given in format string (no. 1) is larger than destination buffer
'cmd[8]', use %7s to prevent overflowing it.
For the current %8s sscanf we
From: Colin Ian King colin.k...@canonical.com
Cppcheck reports the following issue:
[arch/tile/kernel/stack.c:116]: (error) Possible null
pointer dereference: p
In this case, on reporting on an odd fault, p is set to NULL
and immediately afterwords p is dereferenced iff
!kbt-profile is false.
From: Colin Ian King colin.k...@canonical.com
The patch 237fead61998: [PATCH] ecryptfs: fs/Makefile and
fs/Kconfig from Oct 4, 2006, leads to the following static checker
warning:
fs/ecryptfs/crypto.c:846 ecryptfs_new_file_context()
error: off-by-one overflow 'crypt_stat-cipher' size 32. rl
From: Colin Ian King colin.k...@canonical.com
cppcheck detected an unitialized variable:
[drivers/pinctrl/mediatek/pinctrl-mtk-common.c:897]:
(error) Uninitialized variable: unmask
unmask should be initialized to zero to ensure unmasking
only occurs if a previous mask occurred. The current
From: Colin Ian King colin.k...@canonical.com
cppcheck detected an uninitialized variable:
[drivers/pinctrl/mediatek/pinctrl-mtk-common.c:897]:
(error) Uninitialized variable: unmask
unmask should be initialized to zero to ensure unmasking
only occurs if a previous mask occurred. The current
From: Colin Ian King colin.k...@canonical.com
static analysis with smatch picked up the following error:
get_platform_data() error: potential null dereference 'dt_pdata'.
(kzalloc returns null)
ironically, the code already checks for a null kzalloc return and
emits an error message. Fix by
From: Colin Ian King colin.k...@canonical.com
static analysis with smatch picked up the following error:
get_platform_data() error: potential null dereference 'dt_pdata'.
(kzalloc returns null)
Instead, the code should return NULL to avoid the following null
pointer deference. Also, remove
From: Colin Ian King colin.k...@canonical.com
Recent commit 3b8786ff7a1b31645ae2c26a2ec32dbd42ac1094
(ARM: 8352/1: perf: Fix the pmu node name in warning message)
introduced a memory leak of irqs on the Don't bother with PPIs
return path. This was picked up by static analysis by cppcheck:
From: Colin Ian King colin.k...@canonical.com
Recent commit 338d9dd3e2ae (ARM: 8351/1: perf: don't warn about
missing interrupt-affinity property for PPIs) introduced a memory
leak of irqs on the Don't bother with PPIs return path. This issue
was picked up by static analysis by cppcheck:
From: Colin Ian King colin.k...@canonical.com
static analysis from smatch found a potential null dereference:
drivers/misc/sgi-gru/grutlbpurge.c:320 gru_register_mmu_notifier() error:
potential null dereference 'gms'. (kzalloc returns null)
bail out with -ENOMEM rather than falling through
From: Colin Ian King colin.k...@canonical.com
Recent commit 3b8786ff7a1b31645ae2c26a2ec32dbd42ac1094
(ARM: 8352/1: perf: Fix the pmu node name in warning message)
introduced a memory leak of irqs on the Don't bother with PPIs
return path. This was picked up by static analysis by cppcheck:
From: Colin Ian King colin.k...@canonical.com
backlog is not initialised so in the case where
cpg-eng_st != ENGINE_IDLE it is never initialised and
hence which could lead to an illegal memory dereference
in the statement:
backlog-complete(backlog, -EINPROGRESS);
Discovered with cppcheck
From: Colin Ian King colin.k...@canonical.com
pdata is assigned to pdata_of, however, pdata_of becomes dead (when it
goes out of scope) so pdata effectively becomes a dead pointer to the
out of scope object. This is detected by static analysis:
[drivers/regulator/max8660.c:411]: (error) Dead
From: Colin Ian King colin.k...@canonical.com
The debug is printing the struct smt_header * address using
the %x format specifier. Fix it to use %p instead.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/net/fddi/skfp/srf.c | 2 +-
1 file changed, 1 insertion(+), 1
From: Colin Ian King colin.k...@canonical.com
isp1760_ep_alloc_request allocates a structure with kzalloc without checking
for NULL and then returns a pointer to one of the structure fields. As the
field happens to be the first in the structure the caller can properly check
for NULL, but this
From: Colin Ian King colin.k...@canonical.com
The printk format specifier string is missing a space between
the %p format specifier and the on the defer text. Minor fix,
add the missing space.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/scsi/megaraid/megaraid_sas_base.c |
From: Colin Ian King colin.k...@canonical.com
The if statement and closing brace are indented by 1
extra space, so remove this extra spacing. Cosmetic
change only.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
fs/jfs/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2
From: Colin Ian King colin.k...@canonical.com
A reorganisation of the PD allocation and deallocation in commit
9ba1377daa (RDMA/ocrdma: Move PD resource management to driver.)
introduced a double free on pd, as detected by static analysis by
smatch:
From: Colin Ian King colin.k...@canonical.com
The KERN_INFO prefix is being prepended to KERN_DEBUG when using
the dprink macro, Remove it as it is extraneous since we are
printing the message out as debug via dprintk().
Fixes smatch warning:
drivers/misc/altera-stapl/altera.c:2454
From: Colin Ian King colin.k...@canonical.com
If kzalloc returns null then isp1760_ep_alloc_request performs
a null pointer deference on req. Check for null to avoid this.
Detected with smatch static analysis:
drivers/usb/isp1760/isp1760-udc.c:816 isp1760_ep_alloc_request()
error: potential
From: Colin Ian King colin.k...@canonical.com
If kzalloc returns null then isp1760_ep_alloc_request performs
a null pointer dereference on req. Check for null to avoid this.
Detected with smatch static analysis:
drivers/usb/isp1760/isp1760-udc.c:816 isp1760_ep_alloc_request()
error: potential
From: Colin Ian King colin.k...@canonical.com
Various usif_ioctl helper functions do not initialize the
return variable ret and some of the error handling return
paths just return garbage values that were on the stack (or
in a register). I believe that in all the cases, the
initial ret variable
From: Colin Ian King colin.k...@canonical.com
Static analysis with cppcheck found the following error:
[sound/core/init.c:118]: (error) Uninitialized variable: err
..this was introduced by commit 2471b6c80a70e80de69f5ff4c37187c3912e5874
(ALSA: info: Register proc entries recursively, too)
From: Colin Ian King colin.k...@canonical.com
Static analysis by smatch indicated that there was a curly
braces issue:
drivers/scsi/bfa/bfa_ioc.c:3668 bfa_cb_sfp_state_query()
warn: curly braces intended?
drivers/scsi/bfa/bfa_ioc.c:3671 bfa_cb_sfp_state_query()
warn: inconsistent
From: Colin Ian King colin.k...@canonical.com
We're getting build warnings because of poorly defined function
declarations:
turbostat.c: In function ‘dump_cstate_pstate_config_info’:
turbostat.c:1877:1: warning: type of ‘family’ defaults to ‘int’ [-Wimplicit-int]
From: Colin Ian King colin.k...@canonical.com
static analysis from cppcheck detected a memory leak:
[drivers/acpi/resource.c:664]: (error) Memory leak: reg
the error path on a failed request_range call should free
reg before returning. Bug introduced in the recent commit
From: Colin Ian King colin.k...@canonical.com
Static analysis by cppcheck found an issue that was recently introduced by
commit 471f7707b6f0b1 (PM / clock_ops: make __pm_clk_enable more generic)
where a return status in ret was not being initialised and garbage
being returned when ce-status =
From: Colin Ian King colin.k...@canonical.com
Trivial typo fix, \b should be \n
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/scsi/a100u2w.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index
From: Colin Ian King colin.k...@canonical.com
Fix inconsistent indenting in spidev_open, no functional change.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/spi/spidev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spidev.c
From: Colin Ian King colin.k...@canonical.com
Trival change, fix spelling mistake 'aquire' - 'acquire' in
dev_err message.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/crypto/img-hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Colin Ian King colin.k...@canonical.com
Trivial change, fix spelling mistake 'invaild' - 'invalid' in
dev_err message.
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Colin Ian King colin.k...@canonical.com
The error path when the call to lpfc_sli_issue_mbox returns
MBX_NOT_FINISHED results in the code freeing mp and calling
lpfc_mbuf_free twice. Fix this by jumping to the correct
part of the error clean up path.
Signed-off-by: Colin Ian King
From: Colin Ian King colin.k...@canonical.com
Static analysis by smatch indicated that there was a curly
braces issue:
drivers/scsi/megaraid/megaraid_sas_base.c:6139
megasas_mgmt_fw_ioctl() warn: curly braces intended?
Add braces in the appropriate place so that kbuf_arr[i] gets
set to NULL
From: Colin Ian King colin.k...@canonical.com
static analysis by cppcheck has found a check on alloc_bitset that
always evaluates as false and hence never finds an allocation failure:
[drivers/md/dm-cache-policy-smq.c:1689]: (warning) Logical conjunction
always evaluates to false: !EXPR EXPR.
From: Colin Ian King colin.k...@canonical.com
Minor clean up of indenting, no functional change
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
drivers/i2c/busses/i2c-viperboard.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git
From: Colin Ian King colin.k...@canonical.com
xen_has_pv_devices has no parameters, so use the normal void
parameter convention to make it match the prototype in the
header file include/xen/platform_pci.h
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
From: Colin Ian King colin.k...@canonical.com
xen_has_pv_devices has no parameters, so use the normal void
parameter convention to make it match the prototype in the
header file include/xen/platform_pci.h
Signed-off-by: Colin Ian King colin.k...@canonical.com
---
From: Colin Ian King colin.k...@canonical.com
static analysis by smatch caught the following error:
drivers/mtd/maps/physmap_of.c:135 of_get_probes()
error: potential null dereference 'res'. (kzalloc returns null)
Check for failed kzalloc and return -ENOMEM in of_flash_probe if
this occurs.
From: Colin Ian King colin.k...@canonical.com
The KERN_INFO level is being appended to the %s: string in the DEBUGP
macro, so it isn't actually doing what was originally intended and instead
inserts it in the wrong place. Remove it so it is at least we're using
the DEBUGP macro consistently
From: Colin Ian King
minor change, indenting is one tab out.
Signed-off-by: Colin Ian King
---
drivers/net/fjes/fjes_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/fjes/fjes_hw.c
From: Colin Ian King
Static analysis with smatch detected a couple of issues:
drivers/media/usb/hackrf/hackrf.c:1533 hackrf_probe()
error: we previously assumed 'dev' could be null (see line 1366)
drivers/media/usb/hackrf/hackrf.c:1533 hackrf_probe()
error:
From: Colin Ian King
The size and value arguments are swapped in the call to memset
effectively making it a no-op because of the zero size. Swap
these arguments around to do the memset correctly.
Signed-off-by: Colin Ian King
---
From: Colin Ian King
pi_buff is being memset before it is sanity checked. Move the
memset after the null pi_buff sanity check to avoid an oops.
Signed-off-by: Colin Ian King
---
arch/powerpc/platforms/pseries/hvcserver.c | 2 +-
1 file
From: Colin Ian King
Static analysis with cppcheck found the following memory leak:
[drivers/staging/wilc1000/linux_mon.c:255]: (error) Memory leak: mgmt_tx
Free mgmt_tx on the error return path when mgmt_tx->buff fails to be
allocated.
Signed-off-by: Colin Ian King
From: Colin Ian King
On the unlikely event that drv is null, the current code will
perform a null pointer dereference with it when printing a dev_dbg
message. Instead, the BUG_ON check on drv should be performed
before we emit the dev_dbg message.
Signed-off-by: Colin
From: Colin Ian King
The check for send_pkt being NULL is redundant before the call
to htc_reclaim_txctrl_buf, therefore it should be removed. This was
detected by static analysis by cppcheck.
Signed-off-by: Colin Ian King
---
From: Colin Ian King
Commit f368ed6088ae9 ("char: make misc_deregister a void function")
did not remove unused variable res and now we get a build warning:
drivers/rtc/rtc-ds1374.c: In function 'ds1374_remove':
drivers/rtc/rtc-ds1374.c:667:6: warning: unused variable
From: Colin Ian King
xfs_vm_set_page_dirty checks to see if mapping is NULL however
before this unlikely check it already dereferenced mapping when
initializing inode. Move the inode initialization after the mapping
null check to avoid a potential null pointer
From: Colin Ian King
static analysis with cppcheck detected the following error:
[drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1210]:
(error) Uninitialized variable: ret
ret is never initialised, so garbage is being returned. Instead
return the error return
From: Colin Ian King
static analysis using clang's scan-build detected a dead
assignment to len which can be removed.
Signed-off-by: Colin Ian King
---
drivers/fmc/fru-parse.c | 2 --
1 file changed, 2 deletions(-)
diff --git
1 - 100 of 5939 matches
Mail list logo