2020-06-06 15:33:12

by Pavel Machek

[permalink] [raw]
Subject: [PATCH] soc/meson: add missing free_irq() in error path

free_irq() is missing in case of error, fix that.

Signed-off-by: Pavel Machek (CIP) <[email protected]>

diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index 2e9b56b29d31..b2e867113226 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -249,7 +249,7 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
/* Enable pclk to access registers and clock the fifo ip */
ret = clk_prepare_enable(fifo->pclk);
if (ret)
- return ret;
+ goto free_irq;

/* Setup status2 so it reports the memory pointer */
regmap_update_bits(fifo->map, FIFO_CTRL1,
@@ -269,8 +269,14 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
/* Take memory arbitror out of reset */
ret = reset_control_deassert(fifo->arb);
if (ret)
- clk_disable_unprepare(fifo->pclk);
+ goto free_clk;
+
+ return 0;

+free_clk:
+ clk_disable_unprepare(fifo->pclk);
+free_irq:
+ free_irq(fifo->irq, ss);
return ret;
}
EXPORT_SYMBOL_GPL(axg_fifo_pcm_open);

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Attachments:
(No filename) (1.14 kB)
signature.asc (188.00 B)
Digital signature
Download all attachments

2020-06-07 20:46:05

by Jerome Brunet

[permalink] [raw]
Subject: Re: [PATCH] soc/meson: add missing free_irq() in error path


On Sat 06 Jun 2020 at 17:31, Pavel Machek <[email protected]> wrote:

> free_irq() is missing in case of error, fix that.
>
> Signed-off-by: Pavel Machek (CIP) <[email protected]>

Reviewed-by: Jerome Brunet <[email protected]>

>
> diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
> index 2e9b56b29d31..b2e867113226 100644
> --- a/sound/soc/meson/axg-fifo.c
> +++ b/sound/soc/meson/axg-fifo.c
> @@ -249,7 +249,7 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
> /* Enable pclk to access registers and clock the fifo ip */
> ret = clk_prepare_enable(fifo->pclk);
> if (ret)
> - return ret;
> + goto free_irq;
>
> /* Setup status2 so it reports the memory pointer */
> regmap_update_bits(fifo->map, FIFO_CTRL1,
> @@ -269,8 +269,14 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
> /* Take memory arbitror out of reset */
> ret = reset_control_deassert(fifo->arb);
> if (ret)
> - clk_disable_unprepare(fifo->pclk);
> + goto free_clk;
> +
> + return 0;
>
> +free_clk:
> + clk_disable_unprepare(fifo->pclk);
> +free_irq:
> + free_irq(fifo->irq, ss);
> return ret;
> }
> EXPORT_SYMBOL_GPL(axg_fifo_pcm_open);

2020-06-08 11:43:03

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] soc/meson: add missing free_irq() in error path

On Sat, Jun 06, 2020 at 05:31:03PM +0200, Pavel Machek wrote:
> free_irq() is missing in case of error, fix that.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.


Attachments:
(No filename) (453.00 B)
signature.asc (499.00 B)
Download all attachments

2020-06-08 12:00:33

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] soc/meson: add missing free_irq() in error path

On Sat, Jun 06, 2020 at 05:31:03PM +0200, Pavel Machek wrote:
> free_irq() is missing in case of error, fix that.
>
> Signed-off-by: Pavel Machek (CIP) <[email protected]>
>
> diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c

In addition to the subject line issue your Signed-off-by does not match
the From: in the e-mail and there's no From: in the body, please
resubmit with these issues fixed.


Attachments:
(No filename) (425.00 B)
signature.asc (499.00 B)
Download all attachments

2020-06-09 13:03:50

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] soc/meson: add missing free_irq() in error path

On Sat, 6 Jun 2020 17:31:03 +0200, Pavel Machek wrote:
> free_irq() is missing in case of error, fix that.
>
> Signed-off-by: Pavel Machek (CIP) <[email protected]>
>
> diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
> index 2e9b56b29d31..b2e867113226 100644
> --- a/sound/soc/meson/axg-fifo.c
> +++ b/sound/soc/meson/axg-fifo.c
> @@ -249,7 +249,7 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
> /* Enable pclk to access registers and clock the fifo ip */
> ret = clk_prepare_enable(fifo->pclk);
> if (ret)
> - return ret;
> + goto free_irq;
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: meson: add missing free_irq() in error path
commit: 3b8a299a58b2afce464ae11324b59dcf0f1d10a7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark