Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d43fd628 authored by Mohammed Javid's avatar Mohammed Javid
Browse files

msm: ipa3: Fix to avoid accessing of uninitialized structure



Added code changes to check ipa3_ctx initilized or not
during bootup in sdm670.

Change-Id: I03e5b8de30c77da140e9575c2315b0878cf5363c
Acked-by: default avatarAshok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent 5259c812
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5895,6 +5895,10 @@ static int ipa3_smp2p_probe(struct device *dev)
	struct device_node *node = dev->of_node;
	int res;

	if (ipa3_ctx == NULL) {
		IPAERR("ipa3_ctx was not initialized\n");
		return -ENXIO;
	}
	IPADBG("node->name=%s\n", node->name);
	if (strcmp("qcom,smp2pgpio_map_ipa_1_out", node->name) == 0) {
		res = of_get_gpio(node, 0);