From: Dzmitry Sledneu <dzmitry.sledneu@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: [PATCH v2 2/2] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning
Date: Tue, 07 Oct 2014 17:24:57 +0200 [thread overview]
Message-ID: <543405C9.8090706@gmail.com> (raw)
In-Reply-To: <54340568.7090700@gmail.com>
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 | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c
index 6129164..cc788f1 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) {
@@ -361,7 +359,6 @@ err_out2:
err_out1:
kfree(fimage);
-err_out:
return -1;
}
--
2.1.2
next prev parent reply other threads:[~2014-10-07 15:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 14:37 [PATCH 001/002] staging: gs_fpgaboot: Fix "Possible unnecessary KERN_INFO" checkpatch.pl warning Dzmitry Sledneu
2014-10-07 14:39 ` [PATCH 002/002] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" " Dzmitry Sledneu
2014-10-07 15:23 ` [PATCH v2 1/2] staging: gs_fpgaboot: Fix "Possible unnecessary KERN_INFO" " Dzmitry Sledneu
2014-10-07 15:24 ` Dzmitry Sledneu [this message]
2014-10-07 15:30 ` Joe Perches
2014-10-07 15:53 ` [PATCH v3 1/2] staging: gs_fpgaboot: Use print_hex_dump_bytes instead of pr_info Dzmitry Sledneu
2014-10-07 15:54 ` [PATCH v3 2/2] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning Dzmitry Sledneu
2014-10-08 22:48 ` Greg Kroah-Hartman
2014-10-09 7:20 ` Dzmitry Sledneu
2014-10-09 7:22 ` [PATCH v4] staging: gs_fpgaboot: Fix "out of memory" error handling Dzmitry Sledneu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=543405C9.8090706@gmail.com \
--to=dzmitry.sledneu@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.