diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-07-14 14:00:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-29 08:42:53 +0300 |
commit | 9b7fcd3c368d20c3fe7c88430a41805de27dbb25 (patch) | |
tree | 836738690686874edf1fac887452cce6d3dc4bf3 /drivers | |
parent | 562c9d04e545b836624f4b1f074a79f690feb321 (diff) | |
download | linux-9b7fcd3c368d20c3fe7c88430a41805de27dbb25.tar.xz |
hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
[ Upstream commit 3195c4706b00106aa82c73acd28340fa8fc2bfc1 ]
The size used when calling 'pci_alloc_consistent()' and
'pci_free_consistent()' should match.
Fix it and have it consistent with the corresponding call in 'rr_close()'.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/hippi/rrunner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index d7ba2b813eff..40ef4aeb0ef0 100644 --- a/drivers/net/hippi/rrunner.c +++ b/drivers/net/hippi/rrunner.c @@ -1250,7 +1250,7 @@ static int rr_open(struct net_device *dev) rrpriv->info = NULL; } if (rrpriv->rx_ctrl) { - pci_free_consistent(pdev, sizeof(struct ring_ctrl), + pci_free_consistent(pdev, 256 * sizeof(struct ring_ctrl), rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma); rrpriv->rx_ctrl = NULL; } |