diff --git a/sound/soc/rockchip/rockchip_dlp.h b/sound/soc/rockchip/rockchip_dlp.h index e3c6d24e6503..cefd7a4e498d 100644 --- a/sound/soc/rockchip/rockchip_dlp.h +++ b/sound/soc/rockchip/rockchip_dlp.h @@ -81,7 +81,7 @@ static inline struct dlp *soc_component_to_dlp(struct snd_soc_component *p) static inline struct dlp_runtime_data *substream_to_drd( const struct snd_pcm_substream *substream) { - if (!substream->runtime) + if (!substream || !substream->runtime) return NULL; return substream->runtime->private_data;