File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -795,7 +795,7 @@ static int sof_ipc4_init_audio_fmt(struct snd_sof_dev *sdev,
795795static void sof_ipc4_unprepare_copier_module (struct snd_sof_widget * swidget )
796796{
797797 struct sof_ipc4_fw_module * fw_module = swidget -> module_info ;
798- struct sof_ipc4_copier * ipc4_copier ;
798+ struct sof_ipc4_copier * ipc4_copier = NULL ;
799799 struct snd_sof_widget * pipe_widget ;
800800 struct sof_ipc4_pipeline * pipeline ;
801801
@@ -812,9 +812,11 @@ static void sof_ipc4_unprepare_copier_module(struct snd_sof_widget *swidget)
812812 ipc4_copier = dai -> private ;
813813 }
814814
815- kfree (ipc4_copier -> ipc_config_data );
816- ipc4_copier -> ipc_config_data = NULL ;
817- ipc4_copier -> ipc_config_size = 0 ;
815+ if (ipc4_copier ) {
816+ kfree (ipc4_copier -> ipc_config_data );
817+ ipc4_copier -> ipc_config_data = NULL ;
818+ ipc4_copier -> ipc_config_size = 0 ;
819+ }
818820
819821 ida_free (& fw_module -> m_ida , swidget -> instance_id );
820822}
You can’t perform that action at this time.
0 commit comments