[PATCH] media: staging: tegra-vde: add missing pm_runtime_put_autosuspend

2020-06-01 Thread Navid Emamdoost
Call to pm_runtime_get_sync increments counter even in case of failure leading to incorrect ref count. Call pm_runtime_put_autosuspend if pm_runtime_get_sync fails. Signed-off-by: Navid Emamdoost --- drivers/staging/media/tegra-vde/vde.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

Re: [PATCH] staging: comedi: drivers: Fix memory leak in gsc_hpdi_auto_attach

2019-12-16 Thread Navid Emamdoost
Ian, thanks for your feedback. On Mon, Dec 16, 2019 at 4:36 AM Ian Abbott wrote: > > On 15/12/2019 01:33, Navid Emamdoost wrote: > > In the implementation of gsc_hpdi_auto_attach(), the allocated dma > > description is leaks in case of alignment er

Re: [PATCH] staging: rtl8192e: rtllib_module: Fix memory leak in alloc_rtllib

2019-12-15 Thread Navid Emamdoost
Hi Johan, On Sun, Dec 15, 2019 at 7:23 AM Johan Hovold wrote: > > On Sat, Dec 14, 2019 at 05:05:58PM -0600, Navid Emamdoost wrote: > > In the implementation of alloc_rtllib() the allocated dev is leaked in > > case of ieee->pHTInfo allocation failure. Release via free_netde

[PATCH] staging: comedi: drivers: Fix memory leak in gsc_hpdi_auto_attach

2019-12-14 Thread Navid Emamdoost
In the implementation of gsc_hpdi_auto_attach(), the allocated dma description is leaks in case of alignment error, or failure of gsc_hpdi_setup_dma_descriptors() or comedi_alloc_subdevices(). Release devpriv->dma_desc via dma_free_coherent(). Signed-off-by: Navid Emamdoost --- drivers/stag

[PATCH] staging: rtl8192e: rtllib_module: Fix memory leak in alloc_rtllib

2019-12-14 Thread Navid Emamdoost
In the implementation of alloc_rtllib() the allocated dev is leaked in case of ieee->pHTInfo allocation failure. Release via free_netdev(dev). Fixes: 6869a11bff1d ("Staging: rtl8192e: Use !x instead of x == NULL") Signed-off-by: Navid Emamdoost --- drivers/staging/rtl8192e/rtllib

[PATCH] staging: vt6655: Fix memory leak in vt6655_probe

2019-10-04 Thread Navid Emamdoost
In vt6655_probe, if vnt_init() fails the cleanup code needs to be called like other error handling cases. The call to device_free_info() is added. Fixes: 67013f2c0e58 ("staging: vt6655: mac80211 conversion add main mac80211 functions") Signed-off-by: Navid Emamdoost --- drivers/stag

Re: [PATCH] staging: rtl8192u: fix multiple memory leaks on error path

2019-09-30 Thread Navid Emamdoost
Could you take a look at this patch and confirm it, please? On Thu, Sep 19, 2019 at 9:51 PM Navid Emamdoost wrote: > > In rtl8192_tx on error handling path allocated urbs and also skb should > be released. > > Signed-off-by: Navid Emamdoost > --- > drivers/staging/rtl819

[PATCH] Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc

2019-09-29 Thread Navid Emamdoost
ned-off-by: Navid Emamdoost --- drivers/staging/fbtft/fbtft-core.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index cf5700a2ea66..a0a67aa517f0 100644 --- a/drivers/staging/fbtft/fbtft-co

[PATCH] staging: rtl8192u: fix multiple memory leaks on error path

2019-09-19 Thread Navid Emamdoost
In rtl8192_tx on error handling path allocated urbs and also skb should be released. Signed-off-by: Navid Emamdoost --- drivers/staging/rtl8192u/r8192U_core.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers

[PATCH] staging: rtl8192u: release memory on error path

2019-09-19 Thread Navid Emamdoost
In rtl819xU_tx_cmd if usb_submit_urb fails the allocated memories should be released. Signed-off-by: Navid Emamdoost --- drivers/staging/rtl8192u/r8192U_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c

[PATCH] media: staging: davinci: fix for memory leak

2019-09-17 Thread Navid Emamdoost
In ipipe_g_config the allocated memory for params needs to be released if either module_if->get or copy_to_user fails. Signed-off-by: Navid Emamdoost --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/stag

[PATCH] staging: comedi: drivers: prevent memory leak

2019-09-16 Thread Navid Emamdoost
In das1800_attach, the buffer allocated via kmalloc_array needs to be released if an error happens. Signed-off-by: Navid Emamdoost --- drivers/staging/comedi/drivers/das1800.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800

[PATCH v4] staging: rtl8192u: null check the kzalloc

2019-07-31 Thread Navid Emamdoost
In rtl8192_init_priv_variable allocation for priv->pFirmware may fail, so a null check is necessary.priv->pFirmware is accessed later in rtl8192_adapter_start. I added the check and made appropriate changes to propagate the errno to the caller. Signed-off-by: Navid Emamdoost --- Upd

[PATCH v3] staging: rtl8192u: null check the kzalloc

2019-07-30 Thread Navid Emamdoost
fixed prefix Signed-off-by: Navid Emamdoost --- drivers/staging/rtl8192u/r8192U_core.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index fe1f279ca368..569d02240bf5 100644 --- a/d

[PATCH v2] rtl8192_init_priv_variable: null check is missing for kzalloc

2019-07-30 Thread Navid Emamdoost
Allocation for priv->pFirmware may fail, so a null check is necessary. priv->pFirmware is accessed later in rtl8192_adapter_start. I added the check and made appropriate changes to propagate the errno to the caller. Update: fixed style errors Signed-off-by: Navid Emamdoost --- drivers/s

[PATCH] rtl8192_init_priv_variable: null check is missing for kzalloc

2019-07-20 Thread Navid Emamdoost
Allocation for priv->pFirmware may fail, so a null check is necessary. priv->pFirmware is accessed at line 2743. I added the check and made appropriate changes to propagate the errno to the caller. Signed-off-by: Navid Emamdoost --- drivers/staging/rtl8192u/r8192U_core.c | 13 ++