Unverified Commit 910491a8 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15475 wifi: wcn36xx: fix channel survey memory allocation size

parents 5355cc26 dcf55e32
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1586,7 +1586,10 @@ static int wcn36xx_probe(struct platform_device *pdev)
	}

	n_channels = wcn_band_2ghz.n_channels + wcn_band_5ghz.n_channels;
	wcn->chan_survey = devm_kmalloc(wcn->dev, n_channels, GFP_KERNEL);
	wcn->chan_survey = devm_kcalloc(wcn->dev,
					n_channels,
					sizeof(struct wcn36xx_chan_survey),
					GFP_KERNEL);
	if (!wcn->chan_survey) {
		ret = -ENOMEM;
		goto out_wq;