Browse Source

Merge "msm: ipa: Break from loop when icc_path is error"

qctecmdr 3 years ago
parent
commit
0723b1936c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      drivers/platform/msm/ipa/ipa_v3/ipa.c

+ 4 - 1
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -9288,7 +9288,10 @@ fail_init_active_client:
 	ipa3_clk = NULL;
 fail_bus_reg:
 	for (i = 0; i < ipa3_ctx->icc_num_paths; i++)
-		if (ipa3_ctx->ctrl->icc_path[i]) {
+		if (IS_ERR_OR_NULL(ipa3_ctx->ctrl->icc_path[i])) {
+			ipa3_ctx->ctrl->icc_path[i] = NULL;
+			break;
+		} else {
 			icc_put(ipa3_ctx->ctrl->icc_path[i]);
 			ipa3_ctx->ctrl->icc_path[i] = NULL;
 		}