Skip to content

Commit

Permalink
ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was …
Browse files Browse the repository at this point in the history
…successful

All the fail paths during probe will free up the ops, on remove we should
only free it if the probe was successful.

Fixes: bc433fd ("ASoC: SOF: Add ops_free")
Signed-off-by: Peter Ujfalusi <[email protected]>
  • Loading branch information
ujfalusi authored and plbossart committed Aug 11, 2023
1 parent be8ac8b commit c133091
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/sof/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,9 @@ int snd_sof_device_remove(struct device *dev)
snd_sof_ipc_free(sdev);
snd_sof_free_debug(sdev);
snd_sof_remove(sdev);
sof_ops_free(sdev);
}

sof_ops_free(sdev);

/* release firmware */
snd_sof_fw_unload(sdev);

Expand Down

0 comments on commit c133091

Please sign in to comment.