[PATCH] [media] c8sectpfe: Fix uninitialized return in load_c8sectpfe_fw_step1()

2015-09-18 Thread Christian Engelmayer
In case of failure loading the firmware, function load_c8sectpfe_fw_step1() uses the uninitialized variable ret as return value instead of the retrieved error value. Make sure the result is deterministic. Detected by Coverity CID 1324230. Signed-off-by: Christian Engelmayer --- Compile tested

[PATCH] [media] c8sectpfe: Fix uninitialized variable in load_slim_core_fw()

2015-09-18 Thread Christian Engelmayer
Variable err in function load_slim_core_fw() is used without initializer. Make sure that the result is deterministic. Detected by Coverity CID 1324265. Signed-off-by: Christian Engelmayer --- Compile tested only. Applies against linux-next. --- drivers/media/platform/sti/c8sectpfe/c8sectpfe

[PATCH 2/2] drm/vmwgfx: Fix uninitialized return in vmw_kms_helper_dirty()

2015-09-18 Thread Christian Engelmayer
Function vmw_kms_helper_dirty() uses the uninitialized variable ret as return value. Make the result deterministic and directly return as the variable is unused anyway. Detected by Coverity CID 1324255. Signed-off-by: Christian Engelmayer --- Compile tested only. Applies against linux-next

[PATCH 1/2] drm/vmwgfx: Fix uninitialized return in vmw_cotable_unbind()

2015-09-18 Thread Christian Engelmayer
Function vmw_cotable_unbind() uses the uninitialized variable ret as return value. Make the result deterministic and directly return as the variable is unused anyway. Detected by Coverity CID 1324256. Signed-off-by: Christian Engelmayer --- Compile tested only. Applies against linux-next

[PATCH] [media] c8sectpfe: Fix uninitialized return in load_c8sectpfe_fw_step1()

2015-09-18 Thread Christian Engelmayer
In case of failure loading the firmware, function load_c8sectpfe_fw_step1() uses the uninitialized variable ret as return value instead of the retrieved error value. Make sure the result is deterministic. Detected by Coverity CID 1324230. Signed-off-by: Christian Engelmayer <cenge...@gmx

[PATCH] [media] c8sectpfe: Fix uninitialized variable in load_slim_core_fw()

2015-09-18 Thread Christian Engelmayer
Variable err in function load_slim_core_fw() is used without initializer. Make sure that the result is deterministic. Detected by Coverity CID 1324265. Signed-off-by: Christian Engelmayer <cenge...@gmx.at> --- Compile tested only. Applies against linux-next. --- drivers/media/platfo

[PATCH 2/2] drm/vmwgfx: Fix uninitialized return in vmw_kms_helper_dirty()

2015-09-18 Thread Christian Engelmayer
Function vmw_kms_helper_dirty() uses the uninitialized variable ret as return value. Make the result deterministic and directly return as the variable is unused anyway. Detected by Coverity CID 1324255. Signed-off-by: Christian Engelmayer <cenge...@gmx.at> --- Compile tested only. Applies a

[PATCH 1/2] drm/vmwgfx: Fix uninitialized return in vmw_cotable_unbind()

2015-09-18 Thread Christian Engelmayer
Function vmw_cotable_unbind() uses the uninitialized variable ret as return value. Make the result deterministic and directly return as the variable is unused anyway. Detected by Coverity CID 1324256. Signed-off-by: Christian Engelmayer <cenge...@gmx.at> --- Compile tested only. Applies a

[PATCH] rsi: Fix possible leak when loading firmware

2015-08-21 Thread Christian Engelmayer
correctly. Detected by Coverity CID 1316519. Signed-off-by: Christian Engelmayer --- Compile tested only. --- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 8 ++-- drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 8 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/wi

[PATCH] rsi: Fix possible leak when loading firmware

2015-08-21 Thread Christian Engelmayer
by Coverity CID 1316519. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested only. --- drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 8 ++-- drivers/net/wireless/rsi/rsi_91x_usb_ops.c | 8 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net

Re: [PATCH] mfd: cros_ec: Fix possible leak in led_rgb_store()

2015-07-20 Thread Christian Engelmayer
On Mon, 20 Jul 2015 07:50:36 -0700, Gwendal Grignou wrote: > On Sun, Jul 19, 2015 at 12:43 PM, Christian Engelmayer > wrote: > > Function led_rgb_store() contains some direct returns in error cases that > > leak the already allocated cros_ec_command message structure. Make

Re: [PATCH] mfd: cros_ec: Fix possible leak in led_rgb_store()

2015-07-20 Thread Christian Engelmayer
On Mon, 20 Jul 2015 07:50:36 -0700, Gwendal Grignou gwen...@chromium.org wrote: On Sun, Jul 19, 2015 at 12:43 PM, Christian Engelmayer cenge...@gmx.at wrote: Function led_rgb_store() contains some direct returns in error cases that leak the already allocated cros_ec_command message

[PATCH] mfd: cros_ec: Fix possible leak in led_rgb_store()

2015-07-19 Thread Christian Engelmayer
Function led_rgb_store() contains some direct returns in error cases that leak the already allocated cros_ec_command message structure. Make sure that 'msg' is freed in all exit paths. Detected by Coverity CID 1309666. Signed-off-by: Christian Engelmayer --- Compile tested only. Applies against

[PATCH] mfd: cros_ec: Fix possible leak in led_rgb_store()

2015-07-19 Thread Christian Engelmayer
Function led_rgb_store() contains some direct returns in error cases that leak the already allocated cros_ec_command message structure. Make sure that 'msg' is freed in all exit paths. Detected by Coverity CID 1309666. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested only

[PATCH] mfd: cros_ec: Fix leak in sequence_store()

2015-07-18 Thread Christian Engelmayer
The allocated cros_ec_command message structure is not freed in function sequence_store(). Make sure that 'msg' is freed in all exit paths. Detected by Coverity CID 1309667. Signed-off-by: Christian Engelmayer --- Compile tested only. Applies against linux-next. --- drivers/platform/chrome

[PATCH] mfd: cros_ec: Fix leak in sequence_store()

2015-07-18 Thread Christian Engelmayer
The allocated cros_ec_command message structure is not freed in function sequence_store(). Make sure that 'msg' is freed in all exit paths. Detected by Coverity CID 1309667. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested only. Applies against linux-next. --- drivers

[PATCH] xen/pvhvm: Fix non-ANSI declaration of xen_has_pv_devices()

2014-06-14 Thread Christian Engelmayer
Fix sparse warning "non-ANSI function declaration of function 'xen_has_pv_devices'". Signed-off-by: Christian Engelmayer --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/pl

[PATCH] ARM: kprobes: Fix non-ANSI declaration of arch_init_kprobes()

2014-06-14 Thread Christian Engelmayer
Fix sparse warning "non-ANSI function declaration of function 'arch_init_kprobes'". Signed-off-by: Christian Engelmayer --- arch/arm/kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 6d6442

[PATCH] serial: samsung: Fix compile error with SERIAL_SAMSUNG_DEBUG

2014-06-14 Thread Christian Engelmayer
Commit e4ac92d (serial: samsung: Neaten dbg uses) contains a typo in the changed dbg() function regarding the name of the used character buffer. This breaks the build if actually compiled with CONFIG_SERIAL_SAMSUNG_DEBUG. Signed-off-by: Christian Engelmayer --- Compile tested. Applies against

[PATCH] serial: samsung: Fix compile error with SERIAL_SAMSUNG_DEBUG

2014-06-14 Thread Christian Engelmayer
Commit e4ac92d (serial: samsung: Neaten dbg uses) contains a typo in the changed dbg() function regarding the name of the used character buffer. This breaks the build if actually compiled with CONFIG_SERIAL_SAMSUNG_DEBUG. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested

[PATCH] ARM: kprobes: Fix non-ANSI declaration of arch_init_kprobes()

2014-06-14 Thread Christian Engelmayer
Fix sparse warning non-ANSI function declaration of function 'arch_init_kprobes'. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- arch/arm/kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index

[PATCH] xen/pvhvm: Fix non-ANSI declaration of xen_has_pv_devices()

2014-06-14 Thread Christian Engelmayer
Fix sparse warning non-ANSI function declaration of function 'xen_has_pv_devices'. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen

[PATCH] ASoC: wm8985: Remove unused pointer in wm8985_remove()

2014-06-13 Thread Christian Engelmayer
Commit a0b148b4 (ASoC: wm8985: Use devm_regulator_bulk_get()) removed the last user of pointer wm8985 to struct wm8985_priv. Thus remove it. Detected by Coverity CID 1222150. Signed-off-by: Christian Engelmayer --- Compile tested. Applies against branch for-next in tree git.kernel.org/pub/scm

[PATCH] ASoC: wm8985: Remove unused pointer in wm8985_remove()

2014-06-13 Thread Christian Engelmayer
Commit a0b148b4 (ASoC: wm8985: Use devm_regulator_bulk_get()) removed the last user of pointer wm8985 to struct wm8985_priv. Thus remove it. Detected by Coverity CID 1222150. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested. Applies against branch for-next in tree

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

2014-06-01 Thread Christian Engelmayer
On Sun, 1 Jun 2014 13:30:43 +0200, Rickard Strandqvist wrote: > 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 > ---

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

2014-06-01 Thread Christian Engelmayer
On Sun, 1 Jun 2014 13:32:20 +0200, Rickard Strandqvist wrote: > 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 This

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

2014-06-01 Thread Christian Engelmayer
On Sun, 1 Jun 2014 13:32:20 +0200, Rickard Strandqvist rickard_strandqv...@spectrumdigital.se wrote: 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.

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

2014-06-01 Thread Christian Engelmayer
On Sun, 1 Jun 2014 13:30:43 +0200, Rickard Strandqvist rickard_strandqv...@spectrumdigital.se wrote: 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.

[PATCH] of: mdio: fix compile warning in of_mdiobus_register_phy()

2014-05-23 Thread Christian Engelmayer
Commit de906af1 (net: phy: make of_set_phy_supported work with genphy driver) removed the last user of variable 'max_speed' in function of_mdiobus_register_phy(), leading to compile warning "unused variable ‘max_speed’ [-Wunused-variable]". Thus remove it. Signed-off-by: Christian

[PATCH] of: mdio: fix compile warning in of_mdiobus_register_phy()

2014-05-23 Thread Christian Engelmayer
Commit de906af1 (net: phy: make of_set_phy_supported work with genphy driver) removed the last user of variable 'max_speed' in function of_mdiobus_register_phy(), leading to compile warning unused variable ‘max_speed’ [-Wunused-variable]. Thus remove it. Signed-off-by: Christian Engelmayer cenge

[PATCH] Input: ims-pcu - fix uninitialized use of 'error' in ims_pcu_buffers_alloc()

2014-05-18 Thread Christian Engelmayer
In case allocation via usb_alloc_coherent() fails in ims_pcu_buffers_alloc(), the function jumps to the exit path without initializing local variable 'error' that is used as return value. Detected by Coverity - CID 1016531. Signed-off-by: Christian Engelmayer --- This is an allocation function

[PATCH] Input: ims-pcu - fix uninitialized use of 'error' in ims_pcu_buffers_alloc()

2014-05-18 Thread Christian Engelmayer
In case allocation via usb_alloc_coherent() fails in ims_pcu_buffers_alloc(), the function jumps to the exit path without initializing local variable 'error' that is used as return value. Detected by Coverity - CID 1016531. Signed-off-by: Christian Engelmayer cenge...@gmx.at

[PATCH] net/mlx4_en: Fix uninitialized use of 'port_up' in mlx4_en_set_channels()

2014-05-17 Thread Christian Engelmayer
is undetermined. Detected by Coverity - CID 751497. Signed-off-by: Christian Engelmayer --- Compile tested. Applies against branch master in tree git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
On Sat, 17 May 2014 17:44:23 +0300, Dan Carpenter wrote: > On Sat, May 17, 2014 at 12:38:57PM +0200, Christian Engelmayer wrote: > > Function rtw_drv_init() is written in a way that assumes 'status' != > > _SUCCESS > > as long as not explicitly set. Thus initialize 'stat

[PATCH] IB/mlx4: Fix potentially uninitialized use of 'is_mcast' in create_iboe_ah()

2014-05-17 Thread Christian Engelmayer
uninitialized. Thus init 'is_mcast' to 0. Detected by Coverity - CID 1164324 Signed-off-by: Christian Engelmayer --- Compile tested. Applies against branch for-next in tree git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git --- drivers/infiniband/hw/mlx4/ah.c | 2 +- 1 file changed, 1

[PATCH 0/2] staging: rtl8188eu: fix Coverity defects in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git Christian Engelmayer (2): staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init() staging: rtl8188eu: remove dead code in rtw_drv_init() drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 2/2] staging: rtl8188eu: remove dead code in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
(status != _SUCCESS) immediately after 'status = _SUCCESS' will never evaluate true. Thus remove the logically dead code. Detected by Coverity - CID 1077553. Signed-off-by: Christian Engelmayer --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS as long as not explicitly set. Thus initialize 'status' to FAIL, in order to prevent undefined behaviour if going through the exit paths. Detected by Coverity - CID 1077832. Signed-off-by: Christian Engelmayer

[PATCH 0/2] staging: rtl8188eu: fix Coverity defects in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git Christian Engelmayer (2): staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init() staging: rtl8188eu: remove dead code in rtw_drv_init() drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 2/2] staging: rtl8188eu: remove dead code in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
(status != _SUCCESS) immediately after 'status = _SUCCESS' will never evaluate true. Thus remove the logically dead code. Detected by Coverity - CID 1077553. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 -- 1 file changed, 2 deletions

[PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS as long as not explicitly set. Thus initialize 'status' to FAIL, in order to prevent undefined behaviour if going through the exit paths. Detected by Coverity - CID 1077832. Signed-off-by: Christian Engelmayer cenge

[PATCH] IB/mlx4: Fix potentially uninitialized use of 'is_mcast' in create_iboe_ah()

2014-05-17 Thread Christian Engelmayer
uninitialized. Thus init 'is_mcast' to 0. Detected by Coverity - CID 1164324 Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested. Applies against branch for-next in tree git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git --- drivers/infiniband/hw/mlx4/ah.c | 2 +- 1

Re: [PATCH 1/2] staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()

2014-05-17 Thread Christian Engelmayer
On Sat, 17 May 2014 17:44:23 +0300, Dan Carpenter dan.carpen...@oracle.com wrote: On Sat, May 17, 2014 at 12:38:57PM +0200, Christian Engelmayer wrote: Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS as long as not explicitly set. Thus initialize 'status

[PATCH] net/mlx4_en: Fix uninitialized use of 'port_up' in mlx4_en_set_channels()

2014-05-17 Thread Christian Engelmayer
is undetermined. Detected by Coverity - CID 751497. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested. Applies against branch master in tree git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- 1 file changed, 1

[PATCH] misc: genwqe: fix uninitialized return value in genwqe_free_sync_sgl()

2014-05-13 Thread Christian Engelmayer
Function genwqe_free_sync_sgl() returns the value of variable 'rc'. 'rc' is only set in the error paths, thus initialize it by 0. Coverity CID 1204242. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch char-misc-next of tree git.kernel.org/pub/scm/linux/kernel/git

[PATCH] misc: genwqe: fix uninitialized return value in genwqe_free_sync_sgl()

2014-05-13 Thread Christian Engelmayer
Function genwqe_free_sync_sgl() returns the value of variable 'rc'. 'rc' is only set in the error paths, thus initialize it by 0. Coverity CID 1204242. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch char-misc-next of tree git.kernel.org/pub/scm

[PATCH v2] staging: rtl8723au: Remove unused pointer in rtw_wdev_free()

2014-05-07 Thread Christian Engelmayer
Pointer 'pwdev_priv' in function rtw_wdev_free() is unused - thus remove it. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua

[PATCH v2] staging: silicom: Remove needless calls of get_status_port_fn()

2014-05-07 Thread Christian Engelmayer
Remove a needless pointer initialisation and call to get_status_port_fn() in functions remove_bypass_tpl_auto() and set_tpl_fn(). Variable 'pbpctl_dev_b' is set correctly later in the function before first use. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply

[PATCH v2 2/5] staging: rtl8188eu: fix potential leak in rtw_wx_set_enc_ext()

2014-05-07 Thread Christian Engelmayer
Function rtw_wx_set_enc_ext() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077712. Signed-off-by: Christian Engelmayer --- drivers/staging/rtl8188eu/os_dep

[PATCH v3] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-07 Thread Christian Engelmayer
correctly. Detected by Coverity - CID 1077716, 1077717. Signed-off-by: Christian Engelmayer --- v3: Resend after v2 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii

[PATCH v2 0/5] staging: rtl8188eu: fix Coverity defects in os_dep/ioctl_linux.c

2014-05-07 Thread Christian Engelmayer
ove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii The series is compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git Christian Engelmayer (5): staging: rtl8188eu: fix potential le

[PATCH v2] staging: binder: fix usage of uninit scalar in binder_transaction()

2014-05-07 Thread Christian Engelmayer
Fix the error path when a cookie mismatch is detected. In that case the function jumps to the exit label without setting the uninitialized, local variable 'return_error'. Detected by Coverity - CID 201453. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply * rebased

[PATCH v2] staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()

2014-05-07 Thread Christian Engelmayer
is safe. Detected by Coverity - CID 144373. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii Compile

[PATCH v2 3/5] staging: rtl8188eu: fix potential leak in rtw_mp_QueryDrv()

2014-05-07 Thread Christian Engelmayer
Function rtw_mp_QueryDrv() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077713. Signed-off-by: Christian Engelmayer --- drivers/staging/rtl8188eu/os_dep

[PATCH v2] staging: rtl8712: fix potential leaks in r8712_set_key()

2014-05-07 Thread Christian Engelmayer
by Coverity - CID 144370, 144371. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii Compile tested

[PATCH v3] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-07 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Move the affected input verification to the beginning of the function so that it may return directly without leaking already allocated memory. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer --- v3

[PATCH v2 5/5] staging: rtl8188eu: fix potential leak in rtw_mp_pwrtrk()

2014-05-07 Thread Christian Engelmayer
Function rtw_mp_pwrtrk() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - 1077715. Signed-off-by: Christian Engelmayer --- drivers/staging/rtl8188eu/os_dep

[PATCH v2 4/5] staging: rtl8188eu: fix potential leak in rtw_mp_SetRFPath()

2014-05-07 Thread Christian Engelmayer
Function rtw_mp_SetRFPath() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077714. Signed-off-by: Christian Engelmayer --- drivers/staging/rtl8188eu/os_dep

[PATCH v2 1/5] staging: rtl8188eu: fix potential leak in rtw_wx_read32()

2014-05-07 Thread Christian Engelmayer
Function rtw_wx_read32() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077711. Signed-off-by: Christian Engelmayer --- drivers/staging/rtl8188eu/os_dep

[PATCH v2] staging: vt6656: fix potential leak in vt6656_hostap_ioctl()

2014-05-07 Thread Christian Engelmayer
by this driver. Detected by Coverity - CID 144381. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii

[PATCH v2] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

2014-05-07 Thread Christian Engelmayer
. Detected by Coverity - CID 1077830. Signed-off-by: Christian Engelmayer --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii Compile

[PATCH v3] staging: silicom: Remove unused pointer in bypass_init_module()

2014-05-07 Thread Christian Engelmayer
Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused. Thus remove it. With the last variable declaration gone, there is no more need for an own block. Remove it and adapt the indenting accordingly. Signed-off-by: Christian Engelmayer --- v3: Resend after v2 failed to apply

[PATCH v3] staging: silicom: Remove unused pointer in bypass_init_module()

2014-05-07 Thread Christian Engelmayer
Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused. Thus remove it. With the last variable declaration gone, there is no more need for an own block. Remove it and adapt the indenting accordingly. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v3: Resend after v2 failed

[PATCH v2] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

2014-05-07 Thread Christian Engelmayer
. Detected by Coverity - CID 1077830. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us

[PATCH v2 1/5] staging: rtl8188eu: fix potential leak in rtw_wx_read32()

2014-05-07 Thread Christian Engelmayer
Function rtw_wx_read32() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077711. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- drivers/staging

[PATCH v2] staging: vt6656: fix potential leak in vt6656_hostap_ioctl()

2014-05-07 Thread Christian Engelmayer
by this driver. Detected by Coverity - CID 144381. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text

[PATCH v2 5/5] staging: rtl8188eu: fix potential leak in rtw_mp_pwrtrk()

2014-05-07 Thread Christian Engelmayer
Function rtw_mp_pwrtrk() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - 1077715. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- drivers/staging/rtl8188eu

[PATCH v2 4/5] staging: rtl8188eu: fix potential leak in rtw_mp_SetRFPath()

2014-05-07 Thread Christian Engelmayer
Function rtw_mp_SetRFPath() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077714. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- drivers/staging

[PATCH v2] staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()

2014-05-07 Thread Christian Engelmayer
is safe. Detected by Coverity - CID 144373. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us

[PATCH v2 3/5] staging: rtl8188eu: fix potential leak in rtw_mp_QueryDrv()

2014-05-07 Thread Christian Engelmayer
Function rtw_mp_QueryDrv() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077713. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- drivers/staging

[PATCH v2] staging: rtl8712: fix potential leaks in r8712_set_key()

2014-05-07 Thread Christian Engelmayer
by Coverity - CID 144370, 144371. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii

[PATCH v3] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-07 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Move the affected input verification to the beginning of the function so that it may return directly without leaking already allocated memory. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer cenge

[PATCH v2] staging: binder: fix usage of uninit scalar in binder_transaction()

2014-05-07 Thread Christian Engelmayer
Fix the error path when a cookie mismatch is detected. In that case the function jumps to the exit label without setting the uninitialized, local variable 'return_error'. Detected by Coverity - CID 201453. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed to apply

[PATCH v2 0/5] staging: rtl8188eu: fix Coverity defects in os_dep/ioctl_linux.c

2014-05-07 Thread Christian Engelmayer
recv_buf) * fixed mua: no multipart, 7bit text/plain us-ascii The series is compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git Christian Engelmayer (5): staging: rtl8188eu: fix potential leak in rtw_wx_read32() staging

[PATCH v2 2/5] staging: rtl8188eu: fix potential leak in rtw_wx_set_enc_ext()

2014-05-07 Thread Christian Engelmayer
Function rtw_wx_set_enc_ext() dynamically allocates a temporary buffer that is not freed in all error paths. Use a centralized exit path and make sure that all memory is freed correctly. Detected by Coverity - CID 1077712. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- drivers/staging

[PATCH v2] staging: silicom: Remove needless calls of get_status_port_fn()

2014-05-07 Thread Christian Engelmayer
Remove a needless pointer initialisation and call to get_status_port_fn() in functions remove_bypass_tpl_auto() and set_tpl_fn(). Variable 'pbpctl_dev_b' is set correctly later in the function before first use. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed

[PATCH v3] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-07 Thread Christian Engelmayer
correctly. Detected by Coverity - CID 1077716, 1077717. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v3: Resend after v2 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf) * fixed mua: no multipart, 7bit text

[PATCH v2] staging: rtl8723au: Remove unused pointer in rtw_wdev_free()

2014-05-07 Thread Christian Engelmayer
Pointer 'pwdev_priv' in function rtw_wdev_free() is unused - thus remove it. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Resend after v1 failed to apply * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf

Re: [PATCH] staging: rtl8712: fix potential leaks in r8712_set_key()

2014-05-05 Thread Christian Engelmayer
On Sat, 3 May 2014 20:27:35 -0400, Greg KH wrote: > On Thu, May 01, 2014 at 11:54:02PM +0200, Christian Engelmayer wrote: > > Fix potential leaks in the error paths of r8712_set_key(). In case the > > algorithm specific checks fail, the function returns without enqueuing

Re: [PATCH] staging: rtl8712: fix potential leaks in r8712_set_key()

2014-05-05 Thread Christian Engelmayer
On Sat, 3 May 2014 20:27:35 -0400, Greg KH gre...@linuxfoundation.org wrote: On Thu, May 01, 2014 at 11:54:02PM +0200, Christian Engelmayer wrote: Fix potential leaks in the error paths of r8712_set_key(). In case the algorithm specific checks fail, the function returns without enqueuing

[PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

2014-05-03 Thread Christian Engelmayer
. Detected by Coverity - CID 1077830. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/comedi/drivers/ii_pci20kc.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] staging: binder: fix usage of uninit scalar in binder_transaction()

2014-05-03 Thread Christian Engelmayer
Fix the error path when a cookie mismatch is detected. In that case the function jumps to the exit label without setting the uninitialized, local variable 'return_error'. Detected by Coverity - CID 201453. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging

[PATCH] staging: binder: fix usage of uninit scalar in binder_transaction()

2014-05-03 Thread Christian Engelmayer
Fix the error path when a cookie mismatch is detected. In that case the function jumps to the exit label without setting the uninitialized, local variable 'return_error'. Detected by Coverity - CID 201453. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against

[PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

2014-05-03 Thread Christian Engelmayer
. Detected by Coverity - CID 1077830. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/comedi/drivers/ii_pci20kc.c | 1 + 1 file changed, 1 insertion

[PATCH] staging: vt6656: fix potential leak in vt6656_hostap_ioctl()

2014-05-02 Thread Christian Engelmayer
not supported by this driver. Detected by Coverity - CID 144381. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/vt6656/hostap.c | 6 -- 1 file changed, 4 insertions

[PATCH] staging: vt6656: fix potential leak in vt6656_hostap_ioctl()

2014-05-02 Thread Christian Engelmayer
not supported by this driver. Detected by Coverity - CID 144381. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/vt6656/hostap.c | 6 -- 1 file changed, 4

[PATCH] staging: rtl8712: fix potential leaks in r8712_set_key()

2014-05-01 Thread Christian Engelmayer
by Coverity - CID 144370, 144371. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/rtl8712/rtl871x_mlme.c | 28 1 file changed, 20

[PATCH v2] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Move the affected input verification to the beginning of the function so that it may return directly without leaking already allocated memory. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer --- v2

[PATCH v2] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Move the affected input verification to the beginning of the function so that it may return directly without leaking already allocated memory. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer --- v2

Re: [PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
On Thu, 1 May 2014 14:22:17 +0200, Mateusz Guzik wrote: > On Thu, May 01, 2014 at 01:57:27PM +0200, Christian Engelmayer wrote: > > Fix a potential leak in the error path of function update_bcn_wps_ie(). > > Make sure that allocated memory for 'pbackup_remainder_ie' is freed

[PATCH] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree

[PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree

[PATCH] staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()

2014-05-01 Thread Christian Engelmayer
is safe. Detected by Coverity - CID 144373. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 +--- 1 file changed, 9

[PATCH v2] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Christian Engelmayer
correctly. Detected by Coverity - CID 1077716, 1077717. Signed-off-by: Christian Engelmayer --- v2: Added changes requested by Dan Carpenter: * Just return directly where no cleanup is needed. * Prefer naming labels by the labeled action rather than the goto location. Compile tested and applies

[PATCH] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Christian Engelmayer
correctly. Detected by Coverity - CID 1077716, 1077717. Signed-off-by: Christian Engelmayer --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 15 ++- 1 file changed, 10

[PATCH] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Christian Engelmayer
correctly. Detected by Coverity - CID 1077716, 1077717. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 15 ++- 1

[PATCH v2] staging: rtl8188eu: fix potential leak in rtw_set_key()

2014-05-01 Thread Christian Engelmayer
correctly. Detected by Coverity - CID 1077716, 1077717. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- v2: Added changes requested by Dan Carpenter: * Just return directly where no cleanup is needed. * Prefer naming labels by the labeled action rather than the goto location. Compile

[PATCH] staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()

2014-05-01 Thread Christian Engelmayer
is safe. Detected by Coverity - CID 144373. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 +--- 1 file

[PATCH] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch staging

[PATCH] staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()

2014-05-01 Thread Christian Engelmayer
Fix a potential leak in the error path of function update_bcn_wps_ie(). Make sure that allocated memory for 'pbackup_remainder_ie' is freed upon return. Detected by Coverity - CID 1077718. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- Compile tested and applies against branch staging

  1   2   >