Staging: gs_fpgaboot: fix memory allocation in gs_fpgaboot.c
authorBen Marsh <bmarsh94@gmail.com>
Mon, 1 Feb 2016 10:59:52 +0000 (11:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 04:07:29 +0000 (20:07 -0800)
This is a patch for gs_fpgaboot.c that fixes a memory allocation problem
identified by checkpatch.pl.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gs_fpgaboot/gs_fpgaboot.c

index a3a10f9a2a2b684c33481a1e8582649041f6f23f..4c1d53492e67c3dc05f48f31e2850960f33ac7f5 100644 (file)
@@ -291,7 +291,7 @@ static int gs_fpgaboot(void)
        int err;
        struct fpgaimage        *fimage;
 
-       fimage = kmalloc(sizeof(struct fpgaimage), GFP_KERNEL);
+       fimage = kmalloc(sizeof(*fimage), GFP_KERNEL);
        if (!fimage)
                return -ENOMEM;