From: Markus Elfring <elfr...@users.sourceforge.net>
Date: Wed, 25 Jan 2017 22:24:08 +0100

Replace the specification of a data type by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net>
---
 drivers/net/gtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 5d0d520ae40f..f0c123101aa9 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -956,7 +956,7 @@ static int ipv4_pdp_add(struct net_device *dev, struct 
genl_info *info)
 
        }
 
-       pctx = kmalloc(sizeof(struct pdp_ctx), GFP_KERNEL);
+       pctx = kmalloc(sizeof(*pctx), GFP_KERNEL);
        if (pctx == NULL)
                return -ENOMEM;
 
-- 
2.11.0

Reply via email to