From: Markus Elfring <[email protected]>
Date: Mon, 15 May 2017 20:32:12 +0200

Replace the specification of a data structure 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 <[email protected]>
---
 drivers/pnp/quirks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 34e2d4563bbd..f9be5f3fb7ea 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -29,5 +29,5 @@ static void quirk_awe32_add_ports(struct pnp_dev *dev,
 {
        struct pnp_option *new_option;
 
-       new_option = kmalloc(sizeof(struct pnp_option), GFP_KERNEL);
+       new_option = kmalloc(sizeof(*new_option), GFP_KERNEL);
        if (!new_option) {
-- 
2.13.0

Reply via email to