staging: unisys: fix sizeof() in visor_memregion_create_overlapped()
authorBenjamin Romer <benjamin.romer@unisys.com>
Tue, 4 Nov 2014 16:25:20 +0000 (11:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Nov 2014 19:50:49 +0000 (11:50 -0800)
Use the variable name rather than the type in the sizeof() call in this
function.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorutil/memregion_direct.c

index 37770aa..26faad4 100644 (file)
@@ -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;