On Wed, Feb 12, 2025 at 12:50 AM Laurentiu Mihalcea
<laurentiumihalcea111@xxxxxxxxx> wrote:
>
> From: Laurentiu Mihalcea <laurentiu.mihalcea@xxxxxxx>
>
> '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.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@xxxxxxx>
Fixes: 651e0ed391b1 (" ASoC: SOF: imx: introduce more common
structures and functions")
Reviewed-by: Daniel Baluta <daniel.baluta@xxxxxxx>
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]