summaryrefslogtreecommitdiff
path: root/drivers/staging/gs_fpgaboot
diff options
context:
space:
mode:
authorDzmitry Sledneu <dzmitry.sledneu@gmail.com>2014-10-09 09:22:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-20 10:30:13 +0800
commit02c2d43c2615ddc5d6e25f071b0f8d39ebc2d35d (patch)
treea858ca40ae761851b7782cb8e776167fa8888e8c /drivers/staging/gs_fpgaboot
parent402eede3c0b29949cb9c46fcbc2d476c5d266d76 (diff)
staging: gs_fpgaboot: Fix "out of memory" error handling
Fix "out of memory" error handling Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gs_fpgaboot')
-rw-r--r--drivers/staging/gs_fpgaboot/gs_fpgaboot.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
index cbf70cefe6f5..0c18c4c311b4 100644
--- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
+++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
@@ -295,8 +295,8 @@ static int gs_fpgaboot(void)
struct fpgaimage *fimage;
fimage = kmalloc(sizeof(struct fpgaimage), GFP_KERNEL);
- if (fimage == NULL)
- goto err_out;
+ if (!fimage)
+ return -ENOMEM;
err = gs_load_image(fimage, file);
if (err) {
@@ -338,7 +338,6 @@ err_out2:
err_out1:
kfree(fimage);
-err_out:
return -1;
}