All of lore.kernel.org
 help / color / mirror / Atom feed
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 002/002] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning
Date: Tue, 07 Oct 2014 16:39:20 +0200	[thread overview]
Message-ID: <5433FB18.9000009@gmail.com> (raw)
In-Reply-To: <5433FA93.8000607@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 | 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

  reply	other threads:[~2014-10-07 14:39 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 ` Dzmitry Sledneu [this message]
2014-10-07 15:23   ` [PATCH v2 1/2] " Dzmitry Sledneu
2014-10-07 15:24     ` [PATCH v2 2/2] staging: gs_fpgaboot: Fix "Possible unnecessary 'out of memory' message" " Dzmitry Sledneu
2014-10-07 15:30     ` [PATCH v2 1/2] staging: gs_fpgaboot: Fix "Possible unnecessary KERN_INFO" " 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=5433FB18.9000009@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.