summaryrefslogtreecommitdiff
path: root/drivers/net/gtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r--drivers/net/gtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 4213c3b2d532..e8949f556209 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1623,13 +1623,13 @@ static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize)
{
int i;
- gtp->addr_hash = kmalloc_array(hsize, sizeof(struct hlist_head),
- GFP_KERNEL | __GFP_NOWARN);
+ gtp->addr_hash = kmalloc_objs(struct hlist_head, hsize,
+ GFP_KERNEL | __GFP_NOWARN);
if (gtp->addr_hash == NULL)
return -ENOMEM;
- gtp->tid_hash = kmalloc_array(hsize, sizeof(struct hlist_head),
- GFP_KERNEL | __GFP_NOWARN);
+ gtp->tid_hash = kmalloc_objs(struct hlist_head, hsize,
+ GFP_KERNEL | __GFP_NOWARN);
if (gtp->tid_hash == NULL)
goto err1;
@@ -1917,7 +1917,7 @@ static struct pdp_ctx *gtp_pdp_add(struct gtp_dev *gtp, struct sock *sk,
}
- pctx = kmalloc(sizeof(*pctx), GFP_ATOMIC);
+ pctx = kmalloc_obj(*pctx, GFP_ATOMIC);
if (pctx == NULL)
return ERR_PTR(-ENOMEM);