Explorar o código

msm: ipa: fix null pointer exception in rmnet_ipa

Make changes to check if rmnet_ipa3_ctx is non null before
accessing it.

Change-Id: I26286cb43c2a116d78fbc072291454cc43e02ee5
Signed-off-by: Chaitanya Pratapa <[email protected]>
Chaitanya Pratapa %!s(int64=3) %!d(string=hai) anos
pai
achega
16e202768d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c

+ 2 - 1
drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c

@@ -3599,7 +3599,8 @@ static int rmnet_ipa_ap_resume(struct device *dev)
 
 	IPAWANDBG("Enter...\n");
 	/* Clear the suspend in progress flag. */
-	atomic_set(&rmnet_ipa3_ctx->ap_suspend, 0);
+	if (rmnet_ipa3_ctx)
+		atomic_set(&rmnet_ipa3_ctx->ap_suspend, 0);
 	if (netdev) {
 		netif_device_attach(netdev);
 		netif_trans_update(netdev);