[PATCH] staging: iio: adc: mxs-lradc: Change type in printf format string

2015-01-27 Thread Rickard Strandqvist
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

[PATCH] mfd: omap-usb-host: Remove some unused functions

2015-01-03 Thread Rickard Strandqvist
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

[PATCH] media: i2c: adv7604: Remove some unused functions

2015-01-02 Thread Rickard Strandqvist
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

[PATCH] mfd: db8500-prcmu: Remove unused function

2015-01-01 Thread Rickard Strandqvist
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

[PATCH] power: ab8500_fg.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
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

[PATCH] media: i2c: adv7604.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
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

[PATCH] video: fbdev: omap2: dss: dss.c: Remove unused function

2015-01-01 Thread Rickard Strandqvist
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

[PATCH] video: fbdev: omap2: dss: dispc.c: Remove some unused functions

2015-01-01 Thread Rickard Strandqvist
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

[PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Remove unused function

2014-12-21 Thread Rickard Strandqvist
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

[PATCH] scripts: dtc: libfdt: fdt_rw.c: Remove some unused functions

2014-12-21 Thread Rickard Strandqvist
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

[PATCH] dma: imx-dma.c: Remove unused function

2014-12-21 Thread Rickard Strandqvist
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

[PATCH] arch: powerpc: kernel: vio.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
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

[PATCH] arch: powerpc: kernel: smp.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
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

[PATCH] arch: arm: mach-mxs: mach-mxs.c: Remove unused function

2014-12-06 Thread Rickard Strandqvist
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

[PATCH] arch: arm: common: edma.c: Remove some unused functions

2014-12-06 Thread Rickard Strandqvist
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

[PATCH 4/5] power: charger-manager.c: Cleaning up missing null-terminate by switching from strncpy to strzcpy

2014-10-18 Thread Rickard Strandqvist
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

[PATCH] net: ethernet: freescale: fec_main.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-09-14 Thread Rickard Strandqvist
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

Re: [PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-08-16 Thread Rickard Strandqvist
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); >>

[PATCH] scsi: ibmvscsi: ibmvstgt.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-08-02 Thread Rickard Strandqvist
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

[PATCH] scsi: ibmvscsi: ibmvfc.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-30 Thread Rickard Strandqvist
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

[PATCH] scsi: ibmvscsi: ibmvfc.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-30 Thread Rickard Strandqvist
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

[PATCH] arch: powerpc: sysdev: qe_lib: qe.c: Cleaning up in conjunction with strncpy and strcpy

2014-07-26 Thread Rickard Strandqvist
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

[PATCH] scsi: ibmvscsi: ibmvscsi.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-26 Thread Rickard Strandqvist
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

[PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-07-16 Thread Rickard Strandqvist
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

[PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-07-16 Thread Rickard Strandqvist
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

Re: [PATCH v2] tty: serial: msm_serial.c: Cleaning up uninitialized variables

2014-07-09 Thread Rickard Strandqvist
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. >> >&

[PATCH] video: fbdev: omap2: dss: dsi.c: Cleaning up variable that is never used

2014-07-06 Thread 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 -- 1 file changed, 4

[PATCH] video: fbdev: mxsfb.c: Cleaning up variable that is never used

2014-07-06 Thread 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 changed, 2 deletions

[PATCH] video: fbdev: mb862xx: mb862xxfbdrv.c: Cleaning up variable that is never used

2014-07-06 Thread 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 |3 --- 1 file changed, 3

[PATCH] video: fbdev: aty: radeon_base.c: Cleaning up variable that is never used

2014-07-06 Thread 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 ++ 1 file changed

[PATCH v2] tty: serial: msm_serial.c: Cleaning up uninitialized variables

2014-07-06 Thread Rickard Strandqvist
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(

[PATCH] video: fbdev: omap2: dss: dsi.c: Cleaning up variable that is never used

2014-07-05 Thread Rickard Strandqvist
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

Re: [PATCH v3] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-05 Thread Rickard Strandqvist
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

[PATCH] video: fbdev: mxsfb.c: Cleaning up variable that is never used

2014-07-05 Thread Rickard Strandqvist
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

[PATCH] video: fbdev: mb862xx: mb862xxfbdrv.c: Cleaning up variable that is never used

2014-07-05 Thread Rickard Strandqvist
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

[PATCH] video: fbdev: aty: radeon_base.c: Cleaning up variable that is never used

2014-07-05 Thread Rickard Strandqvist
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

Re: [PATCH v3] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-04 Thread Rickard Strandqvist
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

[PATCH v3] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-03 Thread Rickard Strandqvist
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

[PATCH v3] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-03 Thread Rickard Strandqvist
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

Re: [PATCH v2] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-03 Thread Rickard Strandqvist
>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

Re: [PATCH v2] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-01 Thread Rickard Strandqvist
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

Re: [PATCH] power: ab8500_fg.c: Cleaning up uninitialized variables

2014-06-29 Thread Rickard Strandqvist
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

[PATCH v2] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-06-29 Thread Rickard Strandqvist
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

[PATCH v2] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-06-29 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-imx27.c: Cleaning up remove a struct that is unused

2014-06-28 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-single.c: Cleaning up wrong format string usage

2014-06-26 Thread Rickard Strandqvist
%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

[PATCH] gpio: gpio-twl4030.c: Cleaning up null pointer checks that could never happen

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-st.c: Cleaning up values that are never used

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-single.c: Cleaning up values that are never used

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-at91.c: Cleaning up values that are never used

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-st.c: Cleaning up if unsigned is less than zero

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-imx1-core.c: Cleaning up if unsigned is less than zero

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-imx.c: Cleaning up if unsigned is less than zero

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-at91.c: Cleaning up if unsigned is less than zero

2014-06-26 Thread Rickard Strandqvist
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

[PATCH] gpu: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable

2014-06-20 Thread Rickard Strandqvist
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

Re: [PATCH] staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable

2014-06-20 Thread Rickard Strandqvist
.. 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-

[PATCH] staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable

2014-06-14 Thread Rickard Strandqvist
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

[PATCH] staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable

2014-06-14 Thread Rickard Strandqvist
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

[PATCH] scsi: ibmvscsi: ibmvscsi.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Rickard Strandqvist
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

[PATCH] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-06-03 Thread Rickard Strandqvist
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

[PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checked

2014-06-02 Thread Rickard Strandqvist
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

Re: [PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up memory leak

2014-06-02 Thread Rickard Strandqvist
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

Re: [PATCH] atm: fore200e.c: Cleaning up uninitialized variables

2014-06-02 Thread Rickard Strandqvist
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

[PATCH] power: ab8500_fg.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
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

[PATCH] tty: serial: msm_serial.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
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

[PATCH] pinctrl: pinctrl-abx500.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
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

[PATCH] thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up memory leak

2014-06-01 Thread Rickard Strandqvist
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

[PATCH] atm: fore200e.c: Cleaning up uninitialized variables

2014-05-31 Thread Rickard Strandqvist
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

[PATCH] video: fbdev: grvga.c: Fix for possible null pointer dereference

2014-05-20 Thread Rickard Strandqvist
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

[PATCH] iommu: fsl_pamu.c: Fix for possible null pointer dereference

2014-05-17 Thread Rickard Strandqvist
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

[PATCH] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-05-17 Thread Rickard Strandqvist
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