In the implementation of bcm2835_register_pll(), the allocated pll is
leaked if devm_clk_hw_register() fails to register hw. Release pll if
devm_clk_hw_register() fails.
Signed-off-by: Navid Emamdoost
---
drivers/clk/bcm/clk-bcm2835.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
In the implementation of qla2x00_probe_one() the allocated and
initialized ha is leaked if it fails to add target via qlt_add_target().
Go to error handling path if qlt_add_target() fails.
Signed-off-by: Navid Emamdoost
---
drivers/scsi/qla2xxx/qla_os.c | 4 +++-
1 file changed, 3 insertions
In the implementation of uld_send(), the skb is consumed on all
execution paths except one. Release skb when returning NET_XMIT_DROP.
Signed-off-by: Navid Emamdoost
---
v3:
- fixed the base problem, and used kfree_skb
---
drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 +
1 file changed, 1
In the implementation of uld_send(), the skb is consumed on all
execution paths except one. Release skb when returning NET_XMIT_DROP.
Signed-off-by: Navid Emamdoost
---
changes in v2:
- using kfree_skb() based on David Miller suggestion.
---
drivers/net/ethernet/chelsio/cxgb4/sge.c | 2
In the implementation of __mt76x02u_mcu_send_msg() the skb is consumed
all execution paths except one. Release skb before returning if
test_bit() fails.
Signed-off-by: Navid Emamdoost
---
drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 7 +--
1 file changed, 5 insertions(+), 2
The implementation of s3fwrn5_recv_frame() is supposed to consume skb on
all execution paths. Release skb before returning -ENODEV.
Signed-off-by: Navid Emamdoost
---
drivers/nfc/s3fwrn5/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5
In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be
consumed on all execution paths. Release skb before returning if
test_bit() fails.
Signed-off-by: Navid Emamdoost
---
drivers/net/wireless/mediatek/mt7601u/mcu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
In the implementation of uld_send(), the skb is consumed on all
execution paths except one. Release skb when returning NET_XMIT_DROP.
Signed-off-by: Navid Emamdoost
---
drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/chelsio
On Sat, Jul 11, 2020 at 4:04 AM Takashi Iwai wrote:
>
> On Sat, 11 Jul 2020 09:08:30 +0200,
> Navid Emamdoost wrote:
> >
> > In the implementation of snd_trident_create(), the allocated trident is
> > leaked if snd_trident_mixer() fails. Release via snd_trident_free(
In the implementation of snd_trident_create(), the allocated trident is
leaked if snd_trident_mixer() fails. Release via snd_trident_free().
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Navid Emamdoost
---
sound/pci/trident/trident_main.c | 5 -
1 file changed, 4 insert
On Wed, Jun 24, 2020 at 2:40 AM Vinod Koul wrote:
>
> On 03-06-20, 14:36, Navid Emamdoost wrote:
>
> s/fialure/failure
>
> > Calling pm_runtime_get_sync increments the counter even in case of
> > failure, causing incorrect ref count. Call pm_runtime_put_sync if
&g
Hi,
On Wed, Jun 24, 2020 at 2:39 AM Vinod Koul wrote:
>
> On 03-06-20, 13:34, Navid Emamdoost wrote:
> > Calling pm_runtime_get_sync increments the counter even in case of
> > failure, causing incorrect ref count. Call pm_runtime_put if
> > pm_runtime_get_sync fails.
&g
Hi Lucas,
On Wed, Jun 17, 2020 at 4:53 AM Lucas Stach wrote:
>
> Hi Navid,
>
> Am Montag, den 15.06.2020, 01:12 -0500 schrieb Navid Emamdoost:
> > in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
> > and etnaviv_gpu_init the call to pm_runtime
Hi Geert,
On Wed, Jun 17, 2020 at 2:26 AM Geert Uytterhoeven wrote:
>
> Hi Navid,
>
> On Fri, Jun 5, 2020 at 4:50 AM Navid Emamdoost
> wrote:
> > Calling pm_runtime_get_sync increments the counter even in case of
> > failure, causing incorrect ref co
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
Changes in v2:
- use pm_runtime_put_noidle
---
drivers/gpio/gpio-rcar.c | 4 +++-
1 file changed
On Sun, Jun 14, 2020 at 4:27 AM Andy Shevchenko
wrote:
>
> On Sun, Jun 14, 2020 at 8:58 AM Navid Emamdoost
> wrote:
> >
> > in bma150_open, pm_runtime_get_sync is called which
> > increments the counter even in case of failure, leading to incorrect
> > ref cou
in bma150_open, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
Changes in v2:
-- repplace pm_runtime_put with
On Sun, Jun 14, 2020 at 4:48 AM Andy Shevchenko
wrote:
>
> On Sun, Jun 14, 2020 at 9:48 AM Navid Emamdoost
> wrote:
>
> ...
>
> > + if (ret < 0) {
>
> > + pm_runtime_put(gpu->dev);
>
> Please, in all your patc
in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
and etnaviv_gpu_init the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
On Sun, Jun 14, 2020 at 7:47 PM Inki Dae wrote:
>
> Hi,
>
> 20. 6. 14. 오후 3:23에 Navid Emamdoost 이(가) 쓴 글:
> > in mic_pre_enable, pm_runtime_get_sync is called which
> > increments the counter even in case of failure, leading to incorrect
> > ref count. In case of fa
in mic_pre_enable, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
Changes in v2:
- reuse the unlock label and call
On Sun, Jun 14, 2020 at 7:32 AM Andy Shevchenko
wrote:
>
> On Sun, Jun 14, 2020 at 9:55 AM Navid Emamdoost
> wrote:
> >
> > in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments
> > the counter even in case of failure, leading to incorrect
> &
in amdgpu_drm_ioctl the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
1 file changed, 2
in amdgpu_driver_open_kms the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 ++-
1 file
in amdgpu_display_crtc_set_config, the call to pm_runtime_get_sync
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5
The call to pm_runtime_get_sync increments the counter even in case of
failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
1 file changed
in vc4_vec_encoder_enable, the call to pm_runtime_get_sync increments
the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vc4/vc4_vec.c | 8 +---
1 file changed
in vc4_v3d_pm_get, the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vc4/vc4_v3d.c | 1 +
1 file changed, 1 insertion
in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments
the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/vc4/vc4_dsi.c | 10 ++
1 file
in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs,
and etnaviv_gpu_init the call to pm_runtime_get_sync increments the
counter even in case of failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
in panfrost_perfcnt_enable_locked, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/panfrost/panfrost_perfcnt.c
in panfrost_job_hw_submit, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/panfrost/panfrost_job.c | 8 +---
1
in mic_pre_enable, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +-
1 file changed
in stmfts_input_open, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/input/touchscreen/stmfts.c | 7 +--
1 file
in bma150_open, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/input/misc/bma150.c | 7 +--
1 file changed, 5
calling pm_runtime_get_sync increments the counter even in case of
failure, leading to incorrect ref count. In case of failure, decrement
the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/input/keyboard/omap4-keypad.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
in macb_mdio_write, macb_mdio_read, and at91ether_open,
pm_runtime_get_sync is called which increments the counter even in case of
failure, leading to incorrect ref count.
In case of failure, decrement the ref count before returning.
Signed-off-by: Navid Emamdoost
---
drivers/net/ethernet
in fec_enet_mdio_read, fec_enet_mdio_write, fec_enet_get_regs,
fec_enet_open and fec_drv_remove, pm_runtime_get_sync is called which
increments the counter even in case of failure, leading to incorrect
ref count. In case of failure, decrement the ref count before returning.
Signed-off-by: Navid
On Sat, Jun 6, 2020 at 2:29 PM Andy Shevchenko
wrote:
>
>
>
> On Saturday, June 6, 2020, Jonathan Cameron wrote:
>>
>> On Thu, 4 Jun 2020 21:44:44 -0500
>> Navid Emamdoost wrote:
>>
>> > Calling pm_runtime_get_sync increments the counter even i
On Fri, Jun 5, 2020 at 1:09 AM Jon Hunter wrote:
>
>
> On 02/06/2020 05:55, Navid Emamdoost wrote:
> > the call to pm_runtime_get_sync increments the counter even
> > in case of failure leading to incorrect ref count.
> > Call pm_runtime_put if pm_runtime_get_sync f
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/net/can/xilinx_can.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/net/wireless/ti/wlcore/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/pci/controller/pcie-rcar.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/pci/controller/dwc/pci-dra7xx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/pci/controller/dwc/pcie-qcom.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/pci/controller/pci-tegra.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/ata/sata_rcar.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count if pm_runtime_put is not called in
error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/gpio/gpio-arizona.c | 6 +-
1 file
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/gpio/gpio-arizona.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/gpio/gpio-rcar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put_sync if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/mfd/arizona-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/iio/pressure/zpa2326.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/sprd-dma.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/sh/rcar-dmac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/sh/rcar-dmac.c
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/sh/usb-dmac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/tegra210-adma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers
On Thu, Jun 4, 2020 at 12:45 PM Jon Hunter wrote:
>
>
> On 03/06/2020 19:41, Navid Emamdoost wrote:
> > Calling pm_runtime_get_sync increments the counter even in case of
> > failure, causing incorrect ref count. Call pm_runtime_put if
> > pm_runtime_get_sync fails.
&
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put_sync if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/stm32-dmamux.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a
incremented by a call of
>the function “pm_runtime_get_sync”.
>Thus call the function “pm_runtime_put” also in two error cases
>to keep the reference counting consistent.
>
>
> Would you like to add the tag “Fixes” to the commit message?
>
> Regards,
> Markus
--
Navid.
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/tegra210-adma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/tegra210
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/tegra210-adma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/stm32-dma.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a
Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/dma/stm32-mdma.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a
t; opinions just makes things harder for submitters.
Thanks Mark for your constructive opinion,
In most cases, such stylistic comments become confusing and
discouraging to those who are trying to chip in. Personally I think as
long as the patch does not contain typo and is not ambiguous from the
maintainer's perspective, it should be fine to let it go forward.
--
Navid.
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
Call to pm_runtime_get_sync increments counter even in case of
failure leading to incorrect ref count.
Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-img-spfi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers
Call to pm_runtime_get_sync increments counter even in case of
failure leading to incorrect ref count.
Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-tegra20-slink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-tegra20
Call to pm_runtime_get_sync increments counter even in case of
failure leading to incorrect ref count.
Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-tegra20-slink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-tegra20
Call to pm_runtime_get_sync increments counter even in case of
failure leading to incorrect ref count.
Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-tegra20-slink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-tegra20
Call to pm_runtime_get_sync increments counter even in case of
failure leading to incorrect ref count.
Call pm_runtime_put_noidle if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-sprd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-sprd.c b
the call to pm_runtime_get_sync increments the counter even
in case of failure leading to incorrect ref count.
Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-tegra114.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/spi/spi
The counter is incremented via pm_runtime_get even in failure case.
To correct the counter call pm_runtime_put in case of failure, too.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-tegra20-sflash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-tegra20-sflash.c b
The counter is incremented via pm_runtime_get even in failure case.
To correct the counter call pm_runtime_put in case of failure, too.
Signed-off-by: Navid Emamdoost
---
drivers/spi/spi-ti-qspi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti
Even in failed case of pm_runtime_get_sync, the usage_count
is incremented. In order to keep the usage_count with correct
value call appropriate put.
Signed-off-by: Navid Emamdoost
---
drivers/pwm/pwm-img.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm
From: Navid
Even in failed case of pm_runtime_get_sync, the usage_count
is incremented. In order to keep the usage_count with correct
value call pm_runtime_put_autosuspend.
Signed-off-by: Navid
---
drivers/power/supply/bq24190_charger.c | 26 ++
1 file changed, 18
Even in failed case of pm_runtime_get_sync, the usage_count
is incremented. In order to keep the usage_count with correct
value call pm_runtime_put_autosuspend.
Signed-off-by: Navid
---
drivers/power/supply/bq24190_charger.c | 26 ++
1 file changed, 18 insertions(+), 8
Hi Brian,
On Tue, May 12, 2020 at 11:57 AM Brian Norris wrote:
>
> On Fri, Sep 6, 2019 at 11:59 AM Navid Emamdoost
> wrote:
> >
> > In ath9k_wmi_cmd, the allocated network buffer needs to be released
> > if timeout happens. Otherwise memory will be leaked.
> >
&
n may happen? If yes, then is
moving kref_put inside the lock a practical solution?
Thank you,
--
Navid.
ction implementation so that duplicate source code will be reduced.
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=7d194c2100ad2a6dded545887d02754948ca5241#n450
>
> Just a note. Maybe you should also consider to fix this error path in
> ttc_setup_clocksource() when notifier also can fail that there is no
> need to continue with code execution.
>
> Thanks,
> Michal
--
Navid.
("arm: zynq: Use standard timer binding")
Signed-off-by: Navid Emamdoost
---
drivers/clocksource/timer-cadence-ttc.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/clocksource/timer-cadence-ttc.c
b/drivers/clocksource/timer-cadence-t
In the implementation of ttc_setup_clockevent() release the allocated
memory for ttcce if clk_notifier_register() fails.
Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to
return error")
Signed-off-by: Navid Emamdoost
---
Changes in v2:
- Added
In the impelementation of davinci_timer_register() the allocated memory
for clockevent should be released if request_irq() fails.
Fixes: 721154f972aa ("clocksource/drivers/davinci: Add support for clockevents")
Signed-off-by: Navid Emamdoost
---
drivers/clocksource/timer-davinci.c | 1
In the impelementation of ttc_setup_clockevent() the allocated memory
for ttcce should be released if clk_notifier_register() fails.
Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to
return error")
Signed-off-by: Navid Emamdoost
---
drivers/clockso
In the impelementation of bcm2835_timer_init() the allocated memory for
timer should be released if setup_irq() fails.
Fixes: 84c39b8b7d46 ("clocksource/drivers/bcm2835_timer: Unmap region obtained
by of_iomap")
Signed-off-by: Navid Emamdoost
---
drivers/clocksource/bcm2835_timer.
In the impelementation of __ipmi_bmc_register() the allocated memory for
bmc should be released in case ida_simple_get() fails.
Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
Signed-off-by: Navid Emamdoost
---
drivers/char/ipmi/ipmi_msghandler.c |
In the impelementation of amdgpu_fence_emit() if dma_fence_wait() fails
and returns an errno, before returning the allocated memory for fence
should be released.
Fixes: 3d2aca8c8620 ("drm/amdgpu: fix old fence check in amdgpu_fence_emit")
Signed-off-by: Navid Emamdoost
---
drivers/g
On Mon, Oct 21, 2019 at 10:45 AM Tyler Hicks wrote:
>
> On 2019-10-21 10:23:47, Navid Emamdoost wrote:
> > In the implementation of aa_audit_rule_init(), when aa_label_parse()
> > fails the allocated memory for rule is released using
> > aa_audit_rule_free(). But after
errNo and return it
after release.
Fixes: 52e8c38001d8 ("apparmor: Fix memory leak of rule on error exit path")
Signed-off-by: Navid Emamdoost
---
Changes in v3:
-- applied Tyler Hicks recommendation on err initialization.
security/apparmor/audit.c | 3 ++-
1 file changed, 2
he rule, copy errNo and return it
> >> after releasing rule.
> >
> Navid thanks for finding this, and Markus thanks for the review
>
> > Please avoid a duplicate word and a typo in this change description.
> > My preference would be a v2 version of the patch with the
errNo and return it
after release.
Fixes: 52e8c38001d8 ("apparmor: Fix memory leak of rule on error exit path")
Signed-off-by: Navid Emamdoost
---
Changes in v2:
-- Fix typo in description
-- move err definition inside the if statement.
security/apparmor/audit.c | 3 +
, copy errNo and return it
after releasing rule.
Fixes: 52e8c38001d8 ("apparmor: Fix memory leak of rule on error exit path")
Signed-off-by: Navid Emamdoost
---
security/apparmor/audit.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/security/apparmor/audit.c
patch introduces a double-free.
> + return -ENOMEM;
> + }
> + }
>
> ret = of_property_read_string(np, "interface-pix-fmt", &fmt);
> if (!ret) {
> --
> 2.23.0
>
--
Navid.
In the implementation of bcm2835_register_pll(), the allocated memory
for pll should be released if devm_clk_hw_register() fails.
Fixes: b19f009d4510 ("clk: bcm2835: Migrate to clk_hw based registration and OF
APIs")
Signed-off-by: Navid Emamdoost
---
drivers/clk/bcm/clk-bcm2835.c |
q: governor: split cpufreq_governor_dbs()")
Signed-off-by: Navid Emamdoost
---
drivers/cpufreq/cpufreq_governor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq_governor.c
b/drivers/cpufreq/cpufreq_governor.c
index 4bb054d0cb43..deb099d36
In af9005_identify_state when returning -EIO the allocated buffer should
be released. Replace the "return -EIO" with assignment into ret and move
deb_info() under a check.
Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator
from Afatech")
Signed-off
Hi Hans,
On Wed, Oct 9, 2019 at 7:42 AM Hans Verkuil wrote:
>
> On 9/14/19 1:55 AM, Navid Emamdoost wrote:
> > In af9005_identify_state when returning -EIO the allocated buffer should
> > be released.
> >
> > Signed-off-by: Navid Emamdoost
> > ---
> &g
it.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f93616951138a598d930dcaec40f2bfd9ce43bb
> https://lore.kernel.org/lkml/20191001092047.71e8460...@smtp.codeaurora.org/
> https://lore.kernel.org/patchwork/comment/1331936/
>
> Regards,
> Markus
--
Navid.
ffers(), and ql3xxx_send()")
Signed-off-by: Navid Emamdoost
---
drivers/net/ethernet/qlogic/qla3xxx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c
b/drivers/net/ethernet/qlogic/qla3xxx.c
index 457444894d80..b4b8ba00ee01 100644
--- a/drivers/net/ether
In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be
released if mwifiex_map_pci_memory() fails. The release for skb and
card->evtbd_ring_vbase is added.
Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation
routines")
Signed-off-by: Na
In mwifiex_pcie_alloc_cmdrsp_buf, a new skb is allocated which should be
released if mwifiex_map_pci_memory() fails. The release is added.
Fixes: fc3314609047 ("mwifiex: use pci_alloc/free_consistent APIs for PCIe")
Signed-off-by: Navid Emamdoost
---
drivers/net/wireless/marvell/mwif
1 - 100 of 211 matches
Mail list logo