Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e1ba3ba authored by Manikandan Mohan's avatar Manikandan Mohan
Browse files

cnss2: Update bus bandwidth device tree config read



Fix out of bounds write during device tree bus bandwidth array copy.

Change-Id: I5fa1be5beabdccc4d662c74018d8fa22c547697b
Signed-off-by: default avatarManikandan Mohan <manikand@codeaurora.org>
parent 7b54b39b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2263,7 +2263,7 @@ static int cnss_register_bus_scale(struct cnss_plat_data *plat_priv)
	}
	cfg_arr_size = plat_priv->icc.path_count *
			 plat_priv->icc.bus_bw_cfg_count * CNSS_ICC_VOTE_MAX;
	cfg_arr = kzalloc(cfg_arr_size, GFP_KERNEL);
	cfg_arr = kcalloc(cfg_arr_size, sizeof(*cfg_arr), GFP_KERNEL);
	if (!cfg_arr) {
		cnss_pr_err("Failed to alloc cfg table mem\n");
		ret = -ENOMEM;