lkml.org 
[lkml]   [2014]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 002/002] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning
Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning

Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com>

---
drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
index 6129164..b7ca3a3 100644
--- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
+++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
@@ -316,10 +316,8 @@ static int gs_fpgaboot(void)
struct fpgaimage *fimage;

fimage = kmalloc(sizeof(struct fpgaimage), GFP_KERNEL);
- if (fimage == NULL) {
- pr_err("No memory is available\n");
- goto err_out;
- }
+ if (!fimage)
+ return -ENOMEM;

err = gs_load_image(fimage, file);
if (err) {
--
2.1.2

\
 
 \ /
  Last update: 2014-10-07 17:21    [W:0.157 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site