Bläddra i källkod

asoc: wsa884x: add null check for wsa884x->component

add null check before accessing for wsa884x->component.

Change-Id: I0694ad6426317f2f80d5084125c5b24876f96a65
Signed-off-by: Prasad Kumpatla <[email protected]>
Prasad Kumpatla 2 år sedan
förälder
incheckning
58a039c9e6
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      asoc/codecs/wsa884x/wsa884x.c

+ 2 - 1
asoc/codecs/wsa884x/wsa884x.c

@@ -2414,8 +2414,9 @@ static int wsa884x_swr_suspend(struct device *dev)
 	}
 	dev_dbg(dev, "%s: system suspend\n", __func__);
 	if (wsa884x->dapm_bias_off ||
+		(wsa884x->component &&
 		(snd_soc_component_get_bias_level(wsa884x->component) ==
-		 SND_SOC_BIAS_OFF)) {
+		 SND_SOC_BIAS_OFF))) {
 		msm_cdc_set_supplies_lpm_mode(dev, wsa884x->supplies,
 					wsa884x->regulator,
 					wsa884x->num_supplies,