mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 20:02:10 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
402eede3c0
commit
02c2d43c26
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user