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: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
This commit is contained in:
Mohammed Javid 2017-07-21 15:22:58 +05:30 committed by Gerrit - the friendly Code Review server
parent a49bb61510
commit ec183bfa20

View file

@ -5473,6 +5473,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);