Wrong type in printf format string, requires 'int'
but the argument type is 'unsigned int'
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/staging/iio/adc/mxs-lradc.c |2 +-
1 file changed, 1 inse
Removes some functions that are not used anywhere:
usbhs_readb() usbhs_writeb()
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/mfd/omap-usb-host.c | 10 --
1 file changed, 10 deletions(-)
diff --git a
Removes some functions that are not used anywhere:
test_read() edid_read_block() dpp_write() dpp_read()
esdp_write() esdp_read() cec_write_clr_set()
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/media/i2c
Remove the function prcmu_get_boot_status() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/mfd/db8500-prcmu.c |9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/mfd
Remove the function ab8500_fg_reinit() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/power/ab8500_fg.c| 14 --
include/linux/mfd/abx500/ab8500-bm.h |1
Removes some functions that are not used anywhere:
vblanking() hblanking()
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/media/i2c/adv7604.c | 10 --
drivers/media/i2c/adv7842.c | 10
Remove the function dss_get_hdmi_venc_clk_source() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/omap2/dss/dss.c | 14 --
drivers/video/fbdev/omap2/dss/dss.h
analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/omap2/dss/dispc.c | 124 -
drivers/video/fbdev/omap2/dss/dss.h | 12
2 files changed, 136 deletions(-)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c
b
Remove the function ti_bandgap_write_thot() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 13 -
drivers/thermal/ti-soc-thermal/ti
Removes some functions that are not used anywhere:
fdt_delprop() fdt_add_mem_rsv()
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
scripts/dtc/libfdt/fdt_rw.c | 32 -
scripts/dtc/libfdt
Remove the function is_imx21_dma() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/dma/imx-dma.c |5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/dma/imx-dma.c b
Remove the function cmo_high_show() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/powerpc/kernel/vio.c |5 -
1 file changed, 5 deletions(-)
diff --git a/arch/powerpc/kernel
Remove the function generic_mach_cpu_die() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/powerpc/include/asm/smp.h |1 -
arch/powerpc/kernel/smp.c | 14 --
2 files
Remove the function __mxs_togl() that is not used anywhere.
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/arm/mach-mxs/mach-mxs.c |5 -
1 file changed, 5 deletions(-)
diff --git a/arch/arm/mach-mxs/mach
Removes some functions that are not used anywhere:
edma_shadow0_read() edma_or_array()
This was partially found by using a static code analysis program called
cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/arm/common/edma.c |8
1 file changed, 8 deletions(-)
diff --git a
Ensures that the string is null-terminate in connection with the
use of strncpy, by switching from strncpy to strzcpy.
Signed-off-by: Rickard Strandqvist
---
drivers/power/charger-manager.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/charger
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist
---
drivers/net/ethernet/freescale/fec_main.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c
b/drivers/net
eturn 0;
>> -
>> -eadapt:
>> - if (!i2c->use_pio)
>> - free_irq(irq, i2c);
>> -ereqirq:
>> - clk_disable_unprepare(i2c->clk);
>> - iounmap(i2c->reg_base);
>> -eremap:
>> - clk_put(i2c->clk);
>>
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/ibmvscsi/ibmvstgt.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/ibmvscsi/ibmvfc.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index
And as I understand it, it is fine to replace strncpy to strlcpy here.
But if any of this code do not want a null terminated, or want to have the
whole rest of size filled with null characters.
If that is the case this is not a good patch.
Rickard Strandqvist (1):
scsi: ibmvscsi: ibmvfc.c
Replacing strcpy and strncpy with strlcpy to avoid strings that ar to big,
or lacks null terminate.
Signed-off-by: Rickard Strandqvist
---
arch/powerpc/sysdev/qe_lib/qe.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/ibmvscsi/ibmvscsi.c |7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
This start as a fix for possible null pointer dereference.
But after discussion with especially Wolfram, Jingoo and Emil it was
decided to convert the code to uses Managed Device Resource instead.
Rickard Strandqvist (1):
i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference
Fix for possible null pointer dereference, and there was a risk for
memory leak if something unexpected happens and the function returns.
It now uses the Managed Device Resource instead.
Signed-off-by: Rickard Strandqvist
---
drivers/i2c/busses/i2c-pxa.c | 65
2014-07-09 20:02 GMT+02:00 Stephen Boyd :
> On 07/06/14 09:47, Rickard Strandqvist wrote:
>> Set reasonable initial value of some variables, in case
>> they do not get set to something otherwise.
>> And I've also added a plausibility control of the values.
>>
>&
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/omap2/dss/dsi.c | 10 --
1 file changed, 4
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/mxsfb.c |2 --
1 file changed, 2 deletions
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c |3 ---
1 file changed, 3
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/aty/radeon_base.c | 10 ++
1 file changed
Set reasonable initial value of some variables, in case
they do not get set to something otherwise.
And I've also added a plausibility control of the values.
Signed-off-by: Rickard Strandqvist
---
drivers/tty/serial/msm_serial.c | 18 +++---
1 file changed, 11 insertions(
From: Rickard Strandqvist
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/omap2/dss/dsi.c | 10
2014-07-04 19:24 GMT+02:00 Emil Goode :
> Hello,
>
> I noticed one more thing.
>
> On Fri, Jul 04, 2014 at 07:07:48PM +0200, Rickard Strandqvist wrote:
>> 2014-07-04 11:10 GMT+02:00 Emil Goode :
>> > Hello Rickard,
>> >
>> > Since this is a probe fun
From: Rickard Strandqvist
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/mxsfb.c |2 --
1 file
From: Rickard Strandqvist
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
From: Rickard Strandqvist
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/aty/radeon_base.c | 10
2014 at 10:19:16PM +0200, Rickard Strandqvist wrote:
>> Fix for possible null pointer dereferenc, and there is a risk for memory
>> leak if something unexpected happens and the function returns.
>> It now use Managed Device Resource instead.
>>
>> Signed-off-by: Rickar
Fix for possible null pointer dereferenc, and there is a risk for memory leak
if something unexpected happens and the function returns.
It now use Managed Device Resource instead.
Signed-off-by: Rickard Strandqvist
---
drivers/i2c/busses/i2c-pxa.c | 37
After discussion with especially Wolfram and Jingoo it was decided to convert
the code to use the Managed Device Resource.
I lack this kind of hardware so preferably should someone do a HW test.
Rickard Strandqvist (1):
i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc
>dev, res));
I like Wolfram see no point in doing this patch in two steps, as none
of patch 1, which would be the solution to the original problem would
be includid in patch 2.
I will send a V3 of this patch in a moment...
Thanks to everyone who helped out :-)
Kind regards
Rickard Strandq
2014-06-30 2:05 GMT+02:00 Jingoo Han :
> On Monday, June 30, 2014 8:29 AM, Rickard Strandqvist wrote:
>>
>> Fix for possible null pointer dereferenc, and there is a risk for memory
>> leak in when something
>> unexpected happens and the function returns.
>
> W
Hi
Can someone please check on this!
This will cause an error, and is one of the most obvious ones I've found.
So give it one minute please.
Kind regards
Rickard Strandqvist
2014-06-01 22:03 GMT+02:00 Rickard Strandqvist
:
> In this case the wrong variable is used, which has ne
someone do a HW test.
Rickard Strandqvist (1):
i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc
drivers/i2c/busses/i2c-pxa.c | 37 -
1 file changed, 16 insertions(+), 21 deletions(-)
--
1.7.10.4
--
To unsubscribe from this list: send the line
Fix for possible null pointer dereferenc, and there is a risk for memory leak
in when something unexpected happens and the function returns.
Signed-off-by: Rickard Strandqvist
---
drivers/i2c/busses/i2c-pxa.c | 37 -
1 file changed, 16 insertions(+), 21
Removal of a struct that is never used
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-imx27.c |6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-imx27.c b/drivers/pinctrl
%d in format string used, but the type is unsigned int
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-single.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl
Removal of null pointer checks that could never happen
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist
---
drivers/gpio/gpio-twl4030.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-twl4030.c b
Remove variable that are never used
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-st.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers
Remove variable that are never used
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-single.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers
Remove variable that are never used
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-at91.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers
Remove checking if a unsigned is less than zero
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-st.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers
Remove checking if a unsigned is less than zero
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-imx1-core.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-imx1
Remove checking if a unsigned is less than zero
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-imx.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-imx.c b
Remove checking if a unsigned is less than zero
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-at91.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-at91.c b
Before when there was an error a uninitialized variable would be returnd.
Now it returns -ENODEV
This was found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/gpu/ipu-v3/ipu-common.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions
..
Kind regards
Rickard Strandqvist
2014-06-20 0:51 GMT+02:00 Greg Kroah-Hartman :
> On Sun, Jun 15, 2014 at 01:35:21AM +0200, Rickard Strandqvist wrote:
>> Before when there was an error a uninitialized variable would be returnd.
>> Now it returns -ENODEV
>>
>> Signed-
Before when there was an error a uninitialized variable would be returnd.
Now it returns -ENODEV
This was found using a static code analysis program called cppcheck.
Rickard Strandqvist (1):
staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized
variable
drivers
Before when there was an error a uninitialized variable would be returnd.
Now it returns -ENODEV
Signed-off-by: Rickard Strandqvist
---
drivers/staging/imx-drm/ipu-v3/ipu-common.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/ibmvscsi/ibmvscsi.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi
Fix for possible null pointer dereferenc, and there is a risk
for memory leak in when something unexpected happens and the
function returns.
Signed-off-by: Rickard Strandqvist
---
drivers/i2c/busses/i2c-pxa.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff
Wrong address is checked after memory allocation.
Signed-off-by: Rickard Strandqvist
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
Hi
Okay, then I make a new patch with only the if() part of the code.
Best regards
Rickard Strandqvist
2014-06-02 19:08 GMT+02:00 Eduardo Valentin :
> On Sun, Jun 01, 2014 at 01:33:51PM +0200, Rickard Strandqvist wrote:
>> There is a risk for memory leak in when something unexpecte
Hi
No, regardless if it is a program that cppcheck or myself with limited
experience of kernel programming is not so easy to figure out.
But then I know that there is nothing wrong in this case, and that is
the main thing :-)
Best regards
Rickard Strandqvist
2014-06-02 2:10 GMT+02:00 Olof
In this case the wrong variable is used, which has never been initialized.
This will lead to a serious error.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/power/ab8500_fg.c |4 ++--
1 file changed, 2
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/tty/serial/msm_serial.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-abx500.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c |3 ++-
1 file changed, 2
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/atm/fore200e.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/grvga.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/iommu/fsl_pamu.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/i2c/busses/i2c-pxa.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c
71 matches
Mail list logo