Ver Fonte

qcacld-3.0: Initialize pld_soc_info to default values

Some of the members in pld_soc_info structure is not assigned by
platform API's. To avoid uninitialized value access by calling
function initialize pld_soc_info to default value.

Change-Id: I4b6816bf72ebb518b1b8af529763c2f8a8edb38d
CRs-Fixed: 2858219
Karthik Kantamneni há 4 anos atrás
pai
commit
d2e215785c
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      core/pld/src/pld_common.c

+ 1 - 0
core/pld/src/pld_common.c

@@ -1500,6 +1500,7 @@ void pld_disable_irq(struct device *dev, unsigned int ce_id)
 int pld_get_soc_info(struct device *dev, struct pld_soc_info *info)
 {
 	int ret = 0;
+	memset(info, 0, sizeof(*info));
 
 	switch (pld_get_bus_type(dev)) {
 	case PLD_BUS_TYPE_SNOC: