Skip to content

Commit 3195c47

Browse files
tititiou36davem330
authored andcommitted
hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
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: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d113c0f commit 3195c47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/hippi/rrunner.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ static int rr_open(struct net_device *dev)
12421242
rrpriv->info = NULL;
12431243
}
12441244
if (rrpriv->rx_ctrl) {
1245-
pci_free_consistent(pdev, sizeof(struct ring_ctrl),
1245+
pci_free_consistent(pdev, 256 * sizeof(struct ring_ctrl),
12461246
rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma);
12471247
rrpriv->rx_ctrl = NULL;
12481248
}

0 commit comments

Comments
 (0)