[PATCH] video: fbdev: s3fb.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/s3fb.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix for possible null pointer dereference

2014-05-21 Thread Rickard Strandqvist
ckpatch.pl Best regards Rickard Strandqvist 2014-05-21 9:24 GMT+02:00 Dan Carpenter : > On Tue, May 20, 2014 at 04:57:56PM -0700, j...@joshtriplett.org wrote: >> On Tue, May 20, 2014 at 06:26:51PM -0500, Larry Finger wrote: >> > On 05/20/2014 04:31 PM, Rickard Strandqvist wrote

[PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Fix to remove null pointer checks that could never happen

2014-05-22 Thread Rickard Strandqvist
Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 110 +-- 1 file changed, 52 insertions(+), 58 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers

[PATCH] sound: soc: samsung: dma.c: Fix to remove null pointer checks that could never happen

2014-05-22 Thread Rickard Strandqvist
Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist --- sound/soc/samsung/dma.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index dc09b71..0f17ae0 100644 --- a/sound/soc/samsung

[PATCH] staging: rtl8192u: r8192U_core.c: Fix to remove null pointer checks that could never happen

2014-05-22 Thread Rickard Strandqvist
Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8192u/r8192U_core.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 1bb6143..b709750

[PATCH] fs: btrfs: volumes.c: Fix for possible null pointer dereference

2014-05-22 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 --- fs/btrfs/volumes.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/volumes.c

[PATCH] fs: ntfs: file.c: Fix for possible null pointer dereference

2014-05-22 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 --- fs/ntfs/file.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ntfs/file.c b/fs

[PATCH] fs: ocfs2: move_extents.c: Fix for possible null pointer dereference

2014-05-22 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 --- fs/ocfs2/move_extents.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2

[PATCH] tools: perf: builtin-trace.c: Cleaning up inconsistent NULL checks

2014-05-22 Thread Rickard Strandqvist
Cleaning up inconsistent NULL checks. 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 --- tools/perf/builtin-trace.c |6 -- 1 file changed, 4 insertions(+), 2

[PATCH] tools: perf: util: session.c: Cleaning up inconsistent NULL checks

2014-05-22 Thread Rickard Strandqvist
Cleaning up inconsistent NULL checks. 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 --- tools/perf/util/session.c |4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] arch: cris: arch-v32: drivers: axisflashmap.c: Cleaning up inconsistent NULL checks

2014-05-22 Thread Rickard Strandqvist
Cleaning up inconsistent NULL checks. 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 --- arch/cris/arch-v32/drivers/axisflashmap.c |2 +- 1 file changed, 1

[PATCH] arch: metag: mm: hugetlbpage.c: Cleaning up inconsistent NULL checks

2014-05-22 Thread Rickard Strandqvist
Cleaning up inconsistent NULL checks. 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 --- arch/metag/mm/hugetlbpage.c |3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] arch: powerpc: kernel: fadump.c: Cleaning up inconsistent NULL checks

2014-05-22 Thread Rickard Strandqvist
Cleaning up inconsistent NULL checks. 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 --- arch/powerpc/kernel/fadump.c |8 +--- 1 file changed, 5 insertions

Re: [PATCH] arch: cris: arch-v32: drivers: axisflashmap.c: Cleaning up inconsistent NULL checks

2014-05-23 Thread Rickard Strandqvist
Hej Jesper! But in several other place in the feature ensures that main_mtd is not NULL. (That's what cppcheck base their misjudgment on too) Then all these checks are unnecessary? You should know, looks like you've written most of the code in 2007 :) Best regards Rickard Strandqvist

Re: [PATCH] tools: perf: util: session.c: Cleaning up inconsistent NULL checks

2014-05-23 Thread Rickard Strandqvist
Okay, I wrote a patch with many errors in relation to how you want your patches on 3 of May. Maybe from there. But good, then this fix is included :) Best regards Rickard Strandqvist 2014-05-23 9:05 GMT+02:00 Jiri Olsa : > On Thu, May 22, 2014 at 11:58:36PM +0200, Rickard Strandqvist wr

Re: [Ocfs2-devel] [PATCH] fs: ocfs2: move_extents.c: Fix for possible null pointer dereference

2014-05-27 Thread Rickard Strandqvist
Hi Ok good, then everything is under control. The result has been that I've done a number of these types of patches to :) Sending a new patch of that kind then. Best regards Rickard Strandqvist 2014-05-26 5:28 GMT+02:00 Jeff Liu : > Hi, > > On 05/23/2014 04:46 AM, Rickard Str

[PATCH] fs: ocfs2: move_extents.c: Fix to remove null pointer checks that could never happen

2014-05-27 Thread Rickard Strandqvist
Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist --- fs/ocfs2/move_extents.c |3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index 599eb4c..9ba3a10 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs

Re: [PATCH] fs: ocfs2: move_extents.c: Fix to remove null pointer checks that could never happen

2014-05-29 Thread Rickard Strandqvist
sb = OCFS2_SB(inode->i_sb); + struct ocfs2_super *osb; if (!inode) return -ENOENT; + osb = OCFS2_SB(inode->i_sb); + if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) Best regards Rickard Strandqvist 2014-05-29 23:38 GMT+02:00 Andre

Re: [PATCH] arch: metag: mm: hugetlbpage.c: Cleaning up inconsistent NULL checks

2014-05-29 Thread Rickard Strandqvist
it removed. Best regards Rickard Strandqvist 2014-05-28 12:03 GMT+02:00 James Hogan : > Hi Rickard, > > On 22/05/14 23:01, Rickard Strandqvist wrote: >> Cleaning up inconsistent NULL checks. >> There is otherwise a risk of a possible null pointer dereference. >> >&g

Re: [PATCH] scsi: pm8001: pm8001_hwi.c: Fix for possible null pointer dereference

2014-05-29 Thread Rickard Strandqvist
Hi Quite rightly, this is what cppcheck reacts. Ok, I'll send a patch for that instead then. Best regards Rickard Strandqvist 2014-05-28 13:38 GMT+02:00 Tomas Henzl : > On 05/28/2014 01:28 PM, Christoph Hellwig wrote: >> On Sun, May 18, 2014 at 06:14:00PM +0200, Rickard Str

[PATCH] scsi: pm8001: pm8001_hwi.c: Fix to remove null pointer checks that could never happen

2014-05-29 Thread Rickard Strandqvist
Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist --- drivers/scsi/pm8001/pm8001_hwi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index a97be01..721d059 100644

[PATCH] arch: metag: mm: hugetlbpage.c: Fix to remove null pointer checks that could never happen

2014-05-29 Thread Rickard Strandqvist
Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist --- arch/metag/mm/hugetlbpage.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/metag/mm/hugetlbpage.c b/arch/metag/mm/hugetlbpage.c index 0424315..e89c843 100644 --- a/arch

[PATCH] Documentation: connector: ucon.c: Cleaning up file resource leak

2014-05-30 Thread Rickard Strandqvist
Cleaning up a file resource leak Signed-off-by: Rickard Strandqvist --- Documentation/connector/ucon.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c index 8a4da64..f09c6de 100644 --- a/Documentation/connector/ucon.c

[PATCH] tools: power: cpupower: bench: parse.c: Cleaning up use of a non-allocated file resource

2014-05-30 Thread Rickard Strandqvist
Removing the risk of using a non-allocated file resource Signed-off-by: Rickard Strandqvist --- tools/power/cpupower/bench/parse.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/power/cpupower/bench/parse.c b/tools/power/cpupower/bench/parse.c index 543bba1

[PATCH] arch: tile: kernel: unaligned.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 --- arch/tile/kernel/unaligned.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] arch: x86: kvm: x86.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 --- arch/x86/kvm/x86.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a

[PATCH] arch: x86: math-emu: poly_tan.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 --- arch/x86/math-emu/poly_tan.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/math-emu

[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] gpu: drm: radeon: r600_cp.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/gpu/drm/radeon/r600_cp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] iio: adc: ad_sigma_delta.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/iio/adc/ad_sigma_delta.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: rtl8712: rtl871x_ioctl_linux.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/staging/rtl8712/rtl871x_ioctl_linux.c |1 + 1 file changed, 1

[PATCH] staging: rtl8712: rtl871x_mlme.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/staging/rtl8712/rtl871x_mlme.c | 16 +++- 1 file changed

[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] sound: synth: emux: soundfont.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 --- sound/synth/emux/soundfont.c |1 + 1 file changed, 1 insertion(+) diff

[PATCH] tools: lib: traceevent: parse-filter.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 --- tools/lib/traceevent/parse-filter.c |4 +++- 1 file changed, 3 insertions

[PATCH] tools: perf: builtin-trace.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 --- tools/perf/builtin-trace.c |1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
han->scan_type.realbits + chan->scan_type.shift, 8), &raw_sample); out: sample = raw_sample >> chan->scan_type.shift; Best regards Rickard Strandqvist 2014-06-01 11:15 GMT+02:00 Lars-Peter Clausen : > On 06/01/2014 01:11 AM, Rickard Strandqvist wrote: >> >&

Re: [PATCH] iio: adc: ad_sigma_delta.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
Aaa, that is true! Sorry my mistake :( Best regards Rickard Strandqvist 2014-06-01 14:03 GMT+02:00 Lars-Peter Clausen : > On 06/01/2014 01:51 PM, Rickard Strandqvist wrote: >> >> Hi >> >> Believe it reacted to the code below. >> >> If raw_sample = 0

[PATCH] media: usb: dvb-usb-v2: mxl111sf.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/media/usb/dvb-usb-v2/mxl111sf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] net: ethernet: chelsio: cxgb4: t4_hw.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/net/ethernet/chelsio/cxgb4/t4_hw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] net: wireless: libertas: cmd.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/net/wireless/libertas/cmd.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers

[PATCH] net: wireless: rt2x00: rt2x00mac.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/net/wireless/rt2x00/rt2x00mac.c |2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH] net: wireless: rtlwifi: rtl8192de: phy.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/net/wireless/rtlwifi/rtl8192de/phy.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[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] platform: x86: asus-wmi.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/platform/x86/asus-wmi.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH] scsi: advansys.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/scsi/advansys.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] scsi: mpt3sas: mpt3sas_transport.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/scsi/mpt3sas/mpt3sas_transport.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH] scsi: pm8001: pm80xx_hwi.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/scsi/pm8001/pm80xx_hwi.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH] scsi: sun3_NCR5380.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/scsi/sun3_NCR5380.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] staging: rtl8188eu: os_dep: usb_intf.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/staging/rtl8188eu/os_dep/usb_intf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] staging: rtl8192u: r8192U_core.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/staging/rtl8192u/r8192U_core.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[PATCH] staging: tidspbridge: pmgr: dspapi.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/staging/tidspbridge/pmgr/dspapi.c |8 1 file changed, 4 insertions(+), 4

[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] usb: class: usbtmc.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/usb/class/usbtmc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] usb: musb: musb_host.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/usb/musb/musb_host.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] fs: ocfs2: dir.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 --- fs/ocfs2/dir.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/dir.c

[PATCH] net: bluetooth: hci_core.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 --- net/bluetooth/hci_core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net

[PATCH] sound: pci: ice1712: wm8766.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 --- sound/pci/ice1712/wm8766.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] sound: pci: ice1712: wm8776.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 --- sound/pci/ice1712/wm8776.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [PATCH] net: bluetooth: hci_core.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
m not sure if it can happen in reality... Guessing it will be caught by in that case by: if (!chan) return NULL; I had actually not planned to submit this divided by 0 patch at all :-/ Best regards Rickard Strandqvist 2014-06-01 16:24 GMT+02:00 Marcel Holtmann : > Hi Rickard, &g

[PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up unnecessary code

2014-06-01 Thread Rickard Strandqvist
Removes unnecessary code that does not do anything useful. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/staging/rtl8188eu/os_dep/usb_intf.c |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

Re: [PATCH] net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
Hi Sergei! Okay, sorry. But you agree with what it is doing in general then? In this case, I am sending a new patch... Best regards Rickard Strandqvist 2014-06-01 18:38 GMT+02:00 Sergei Shtylyov : > Hello. > > > On 06/01/2014 04:49 PM, Rickard Strandqvist wrote: > >> The

Re: [PATCH] net: ethernet: chelsio: cxgb4: t4_hw.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
Hi Dimitrios! Okay sorry, I see what you mean... Best regards Rickard Strandqvist 2014-06-01 21:11 GMT+02:00 Dimitrios Michailidis : > Rickard Strandqvist wrote: >> There is a risk that the variable will be used without being initialized. > > There isn't actual risk here,

[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] net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variable

2014-06-01 Thread Rickard Strandqvist
There is a risk that the variables will be used without being initialized. Have also moved variable to the part of the code where it is used. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/net/wireless/rtlwifi

Re: [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up uninitialized variables

2014-06-01 Thread Rickard Strandqvist
iable then instead? Best regards Rickard Strandqvist 2014-06-01 22:37 GMT+02:00 Dan Carpenter : > On Sun, Jun 01, 2014 at 03:28:35PM +0200, Rickard Strandqvist wrote: >> There is a risk that the variable will be used without being initialized. >> >> This was largely found by us

[PATCH] arch: ia64: kernel: palinfo.c: Optimization of the Code

2014-06-01 Thread Rickard Strandqvist
>From what I know, AND is faster then modulo. Not sure if this is worth changing though. Signed-off-by: Rickard Strandqvist --- arch/ia64/kernel/palinfo.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c in

[PATCH] arch: ia64: kernel: patch.c: Optimization of the Code

2014-06-01 Thread Rickard Strandqvist
>From what I know, AND is faster then modulo. Not sure if this is worth changing though. Signed-off-by: Rickard Strandqvist --- arch/ia64/kernel/patch.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index 1cf0

[PATCH] arch: ia64: kernel: smpboot.c: Optimization of the Code

2014-06-01 Thread Rickard Strandqvist
>From what I know, AND is faster then modulo. Not sure if this is worth changing though. Signed-off-by: Rickard Strandqvist --- arch/ia64/kernel/smpboot.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 547a

[PATCH] arch: sparc: kernel: smp_64.c: Optimization of the Code

2014-06-01 Thread Rickard Strandqvist
>From what I know, AND is faster then modulo. Not sure if this is worth changing though. Signed-off-by: Rickard Strandqvist --- arch/sparc/kernel/smp_64.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 745a

Re: [PATCH] staging: rtl8712: rtl871x_mlme.c: Cleaning up memory leak

2014-06-01 Thread Rickard Strandqvist
Hi Christian! Yes! I mail about this for the first time in early May, but ther were many other faults in the design of my patch, had several different types of errors in the same path etc. So good that they have already been solved then :) Best regards Rickard Strandqvist 2014-06-01 23:50

Re: [PATCH] gpu: drm: radeon: r600_cp.c: Cleaning up uninitialized variables

2014-06-02 Thread Rickard Strandqvist
Hi Thanks for your response! No, it does not sound like it's worth changing anything. Although in the worst case with this patch you probably have a more consistent error :) Best regards Rickard Strandqvist 2014-06-02 9:48 GMT+02:00 Christian König : > Am 01.06.2014 01:10, schrieb

Re: [PATCH] arch: ia64: kernel: palinfo.c: Optimization of the Code

2014-06-02 Thread Rickard Strandqvist
Hi Thought I would be able to do that. But after testing, I could not measure any difference. Thought it would make a noticeable difference, but guess gcc resolve this in the best way. Best regards Rickard Strandqvist 2014-06-02 9:24 GMT+02:00 Clemens Ladisch : > Rickard Strandqvist wr

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

Re: [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up uninitialized variables

2014-06-02 Thread Rickard Strandqvist
=all drivers/staging/rtl8192u/r8192U_core.c Best regards Rickard Strandqvist 2014-06-02 9:39 GMT+02:00 Dan Carpenter : > On Sun, Jun 01, 2014 at 11:05:39PM +0200, Rickard Strandqvist wrote: >> Hi Dan >> >> I agree, this looks strange. >> Have been looking for a while in hi

Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up uninitialized variables

2014-06-02 Thread Rickard Strandqvist
check before I send any more patches. Best regards Rickard Strandqvist 2014-06-02 11:12 GMT+02:00 Dan Carpenter : > On Sun, Jun 01, 2014 at 03:23:40PM +0200, Rickard Strandqvist wrote: >> There is a risk that the variable will be used without being initialized. >> >> This wa

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

[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] fs: ocfs2: dir.c: Cleaning up uninitialized variables

2014-06-02 Thread Rickard Strandqvist
the out: part of the code. Sorry about this :-( Best regards Rickard Strandqvist 2014-06-02 22:22 GMT+02:00 Andrew Morton : > On Sun, 1 Jun 2014 15:53:04 +0200 Rickard Strandqvist > wrote: > >> There is a risk that the variable will be used without being initialized. > &g

Re: [PATCH] staging: rtl8712: rtl871x_ioctl_linux.c: Cleaning up memory leak

2014-06-02 Thread Rickard Strandqvist
Hi Okay, this code has been changed in linux-next, before the allocation before the switch statement. Yes, I repeat it to myself.. I'll check everything against linux-next in the future! Best regards Rickard Strandqvist 2014-06-02 10:41 GMT+02:00 Dan Carpenter : > On Sun, Jun 01, 20

[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

Re: [PATCH] staging: tidspbridge: pmgr: dspapi.c: Cleaning up uninitialized variables

2014-06-03 Thread Rickard Strandqvist
Best regards Rickard Strandqvist 2014-06-02 12:10 GMT+02:00 Dan Carpenter : > [ I am writing this at the end after writing the rest of this email. > > After looking at the CP_TO_USR() macro more carefully, I realize that > the uninitialized variable bugs you are fixing are false posit

[PATCH] staging: tidspbridge: pmgr: dspapi.c: Cleaning up uninitialized variable

2014-06-03 Thread Rickard Strandqvist
There is a risk that the variables will be used without being initialized. Has also improved error handling, after an email proposal from Dan Carpenter. Signed-off-by: Rickard Strandqvist --- drivers/staging/tidspbridge/pmgr/dspapi.c | 64 ++--- 1 file changed, 31

[PATCH] scsi: bfa: bfad_attr.c: Optimization of the Code

2014-06-04 Thread Rickard Strandqvist
Minimized the use of snprintf() And removed a variable that was only used for the temporary storage. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/scsi/bfa/bfad_attr.c | 14 -- 1 file changed, 8

[PATCH] Documentation: accounting: getdelays.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 --- Documentation/accounting/getdelays.c |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/accounting

[PATCH] Documentation: laptops: hpfall.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 --- Documentation/laptops/hpfall.c |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/laptops/hpfall.c b

[PATCH] net: ethernet: intel: ixgbe: ixgbe_main.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/net/ethernet/intel/ixgbe/ixgbe_main.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[PATCH] s390: scsi: zfcp_aux.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/s390/scsi/zfcp_aux.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers

[PATCH] scsi: bfa: bfad_attr.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/bfa/bfad_attr.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/bfa

[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] scsi: mpt2sas: mpt2sas_base.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/mpt2sas/mpt2sas_base.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi

[PATCH] scsi: mpt3sas: mpt3sas_base.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/mpt3sas/mpt3sas_base.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi

[PATCH] staging: usbip: stub_main.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/staging/usbip/stub_main.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/usbip/stub_main.c

[PATCH] kernel: debug: kdb: kdb_io.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 --- kernel/debug/kdb/kdb_io.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/debug/kdb

[PATCH] kernel: debug: kdb: kdb_main.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 --- kernel/debug/kdb/kdb_main.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/debug/kdb

[PATCH] tools: lib: api: fs: debugfs.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 --- tools/lib/api/fs/debugfs.c |1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib

[PATCH] tools: perf: util: parse-events.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 --- tools/perf/util/parse-events.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/util

[PATCH] tools: perf: util: svghelper.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 --- tools/perf/util/svghelper.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/util

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

2014-06-04 Thread Rickard Strandqvist
Hi A little embarrassing, but I actually did not know that there was a better replacement for strncpy. Sorry, but I will send a new platch based on strlcpy instead then. Best regards Rickard Strandqvist 2014-06-04 23:59 GMT+02:00 Heiko Carstens : > On Wed, Jun 04, 2014 at 11:31:11PM +0

Re: [PATCH] tools: perf: util: parse-events.c: Cleaning up missing null-terminate after strncpy call

2014-06-04 Thread Rickard Strandqvist
Hi A little embarrassing, but I actually did not know that there was a better replacement for strncpy. Sorry, but I will send a new platch based on strlcpy instead then, snprintf i slow and unnecessary in this case. Best regards Rickard Strandqvist 2014-06-05 0:20 GMT+02:00 Andi Kleen : >

<    2   3   4   5   6   7   8   9   10   11   >