From 6172624a8ce743d51a674d952ff8d591a9116bce Mon Sep 17 00:00:00 2001 From: Ben Marsh Date: Mon, 1 Feb 2016 11:59:52 +0100 Subject: [PATCH] Staging: gs_fpgaboot: fix memory allocation in gs_fpgaboot.c This is a patch for gs_fpgaboot.c that fixes a memory allocation problem identified by checkpatch.pl. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c index a3a10f9a2a2b..4c1d53492e67 100644 --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c @@ -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; -- 2.39.5