[PATCH AUTOSEL 5.10 29/62] Revert "ASoC: rt5645: fix a NULL pointer dereference"
From: Greg Kroah-Hartman gregkh@linuxfoundation.org
[ Upstream commit 1e0ce84215dbfd6065872e5d3755352da34f198b ]
This reverts commit 51dd97d1df5fb9ac58b9b358e63e67b530f6ae21.
Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not.
Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change.
Lots of things seem to be still allocated here and must be properly cleaned up if an error happens here.
Cc: Kangjie Lu kjlu@umn.edu Cc: Mark Brown broonie@kernel.org Link: https://lore.kernel.org/r/20210503115736.2104747-55-gregkh@linuxfoundation.o... Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Sasha Levin sashal@kernel.org --- sound/soc/codecs/rt5645.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 420003d062c7..ed4b59ba63f3 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3419,9 +3419,6 @@ static int rt5645_probe(struct snd_soc_component *component) RT5645_HWEQ_NUM, sizeof(struct rt5645_eq_param_s), GFP_KERNEL);
- if (!rt5645->eq_param) - return -ENOMEM; - return 0; }
On Mon, May 24, 2021 at 10:47:10AM -0400, Sasha Levin wrote:
Lots of things seem to be still allocated here and must be properly cleaned up if an error happens here.
That's not true, the core already has cleanup for everything else (as the followup patch in your series identified, though it was a bit confused as to how).
RT5645_HWEQ_NUM, sizeof(struct rt5645_eq_param_s), GFP_KERNEL);
- if (!rt5645->eq_param)
return -ENOMEM;
Without the followup patch (which I don't think is suitable for stable) this will just remove error checking. It's not likely to happen and hence make a difference but on the other hand it introduces a problem, especially when backported in isolation.
On Tue, May 25, 2021 at 11:00:33PM +0100, Mark Brown wrote:
On Mon, May 24, 2021 at 10:47:10AM -0400, Sasha Levin wrote:
Lots of things seem to be still allocated here and must be properly cleaned up if an error happens here.
That's not true, the core already has cleanup for everything else (as the followup patch in your series identified, though it was a bit confused as to how).
RT5645_HWEQ_NUM, sizeof(struct rt5645_eq_param_s), GFP_KERNEL);
- if (!rt5645->eq_param)
return -ENOMEM;
Without the followup patch (which I don't think is suitable for stable) this will just remove error checking. It's not likely to happen and hence make a difference but on the other hand it introduces a problem, especially when backported in isolation.
I'll drop this and the follow up patch, thanks.
participants (2)
-
Mark Brown
-
Sasha Levin