Commit 230efff4 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller
Browse files

ionic: fix sizeof usage



Use the actual pointer that we care about as the subject of the
sizeof, rather than a struct name.

Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f4e7f4e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -676,20 +676,20 @@ static int ionic_qcqs_alloc(struct ionic_lif *lif)

	err = -ENOMEM;
	lif->txqcqs = devm_kcalloc(dev, lif->ionic->ntxqs_per_lif,
				   sizeof(struct ionic_qcq *), GFP_KERNEL);
				   sizeof(*lif->txqcqs), GFP_KERNEL);
	if (!lif->txqcqs)
		goto err_out;
	lif->rxqcqs = devm_kcalloc(dev, lif->ionic->nrxqs_per_lif,
				   sizeof(struct ionic_qcq *), GFP_KERNEL);
				   sizeof(*lif->rxqcqs), GFP_KERNEL);
	if (!lif->rxqcqs)
		goto err_out;

	lif->txqstats = devm_kcalloc(dev, lif->ionic->ntxqs_per_lif,
				     sizeof(struct ionic_tx_stats), GFP_KERNEL);
				     sizeof(*lif->txqstats), GFP_KERNEL);
	if (!lif->txqstats)
		goto err_out;
	lif->rxqstats = devm_kcalloc(dev, lif->ionic->nrxqs_per_lif,
				     sizeof(struct ionic_rx_stats), GFP_KERNEL);
				     sizeof(*lif->rxqstats), GFP_KERNEL);
	if (!lif->rxqstats)
		goto err_out;