[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjFMMEniUVlb1QsX@google.com>
Date: Wed, 16 Mar 2022 10:32:16 +0800
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Miaoqian Lin <linmq006@...il.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Jiaxin Yu <jiaxin.yu@...iatek.com>,
Shunli Wang <shunli.wang@...iatek.com>,
alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ASoC: mediatek: Fix error handling in
mt8183_da7219_max98357_dev_probe
On Wed, Mar 16, 2022 at 01:40:57AM +0000, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
>
> This function only calls of_node_put() in the regular path.
> And it will cause refcount leak in error paths.
> Fix this by calling of_node_put() in error handling too.
>
> Fixes: 5bdbe9771177 ("ASoC: mediatek: mt8183-da7219: use hdmi-codec")
> Fixes: ebbddc75bbe8 ("ASoC: Mediatek: MT8183: Add machine driver with DA7219")
Again, I am not sure if the Fixes tag makes sense. Although the issue was
there when the driver birth, there are some more commits after then.
Given that:
- The patch is a minor fix (see [1][2]).
- There is no specific commit the patch aims to fix.
I prefer to drop the Fixes tags. In any case, I don't think the tags would be
helpful.
I would defer to Mark.
[1]: https://elixir.bootlin.com/linux/v5.17-rc8/source/include/linux/of.h#L129
[2]: https://elixir.bootlin.com/linux/v5.17-rc8/source/drivers/of/Kconfig#L55
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@...nel.org>
Powered by blists - more mailing lists