diff options
author | Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> | 2025-02-11 17:50:18 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-02-12 13:46:00 +0000 |
commit | f22ba3561daa792dd138ed543e0bf48efe0b999c (patch) | |
tree | 9fc60aa6a06c76fe4ce476d020f633c5b04a671f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 21aa330fec31bb530a4ef6c9555fb157d0711112 (diff) |
ASoC: SOF: imx-common: set sdev->pdata->hw_pdata after common is alloc'd
'imx_unregister_action' uses 'sdev->pdata->hw_pdata' to fetch the pointer
to the common data structure. As such, if 'sdev->pdata->hw_pdata' is not
set before adding 'imx_unregister_action' to the devres list, we risk
derefrencing a NULL pointer if any of the calls between
'devm_add_action_or_reset' and 'sdev->pdata->hw_pdata = common' fails.
Set 'sdev->pdata->hw_pdata' to point to 'common' as soon as 'common' is
allocated.
Fixes: 651e0ed391b1 (" ASoC: SOF: imx: introduce more common structures and functions")
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20250211225018.2642-1-laurentiumihalcea111@gmail.com
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions