Procházet zdrojové kódy

qcacld-3.0: Init cap before use it

In function ol_configure_target cap is used uninitialized when call
pld_get_platform_cap fail, although pld_get_bus_type and
hif_get_bus_type return same bus type, so actually it has no issue here,
but it look not clear here, init it explicitly.

Change-Id: I001956521c62c14b3537b399bbca1791b274a4c7
CRs-Fixed: 2115553
Will Huang před 7 roky
rodič
revize
2788dcf8f2
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      core/bmi/src/ol_fw.c

+ 1 - 1
core/bmi/src/ol_fw.c

@@ -737,7 +737,7 @@ static QDF_STATUS ol_set_lpass_support(struct ol_context *ol_ctx)
 QDF_STATUS ol_configure_target(struct ol_context *ol_ctx)
 {
 	uint32_t param;
-	struct pld_platform_cap cap;
+	struct pld_platform_cap cap = {0};
 	int ret;
 	struct hif_opaque_softc *scn = ol_ctx->scn;
 	struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);