Commit 02c2d43c authored by Dzmitry Sledneu's avatar Dzmitry Sledneu Committed by Greg Kroah-Hartman

staging: gs_fpgaboot: Fix "out of memory" error handling

Fix "out of memory" error handling
Signed-off-by: default avatarDzmitry Sledneu <dzmitry.sledneu@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 402eede3
......@@ -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 @@ static int gs_fpgaboot(void)
err_out1:
kfree(fimage);
err_out:
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment