From: Benjamin Romer Date: Tue, 4 Nov 2014 16:25:20 +0000 (-0500) Subject: staging: unisys: fix sizeof() in visor_memregion_create_overlapped() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6db05d3f9abbdb0bdf9e07bf458bd7b2bea77092;p=linux-beck.git staging: unisys: fix sizeof() in visor_memregion_create_overlapped() Use the variable name rather than the type in the sizeof() call in this function. Signed-off-by: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 37770aa5229d..26faad470705 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -86,7 +86,7 @@ visor_memregion_create_overlapped(struct memregion *parent, ulong offset, __func__, offset, nbytes); return NULL; } - memregion = kzalloc(sizeof(struct memregion), GFP_KERNEL|__GFP_NORETRY); + memregion = kzalloc(sizeof(*memregion), GFP_KERNEL|__GFP_NORETRY); if (memregion == NULL) { ERRDRV("%s allocation failed", __func__); return NULL;