summaryrefslogtreecommitdiff
path: root/drivers/atm/iphase.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-06-28 12:24:42 +0300
committerDavid S. Miller <davem@davemloft.net>2018-06-30 18:44:38 +0900
commit92291c95e71a7898109c1f95adfb48aa69e5ba7b (patch)
treeaf0221ab3541fc9c42990c26a6f476ba2f316885 /drivers/atm/iphase.c
parentc860e997e9170a6d68f9d1e6e2cf61f572191aaf (diff)
atm: iphase: fix a 64 bit bug
The code assumes that there is 4 bytes in a pointer and it doesn't allocate enough memory. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/iphase.c')
-rw-r--r--drivers/atm/iphase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index ff81a576347e..82532c299bb5 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1618,7 +1618,7 @@ static int rx_init(struct atm_dev *dev)
skb_queue_head_init(&iadev->rx_dma_q);
iadev->rx_free_desc_qhead = NULL;
- iadev->rx_open = kcalloc(4, iadev->num_vc, GFP_KERNEL);
+ iadev->rx_open = kcalloc(iadev->num_vc, sizeof(void *), GFP_KERNEL);
if (!iadev->rx_open) {
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
dev->number);