public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kernel-janitors@vger.kernel.org, Lee Jones <lee.jones@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Lars Pöschel" <poeschel@lemonage.de>,
	"Samuel Ortiz" <sameo@linux.intel.com>
Subject: [PATCH] mfd/viperboard: Delete an error message for a failed memory allocation in vprbrd_probe()
Date: Tue, 16 Jan 2018 16:42:26 +0000	[thread overview]
Message-ID: <9c50fe6a-21cc-e49d-1b10-5d2457ed4e2a@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jan 2018 17:30:23 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/mfd/viperboard.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c
index e6b3c70aeb22..e9f61262d583 100644
--- a/drivers/mfd/viperboard.c
+++ b/drivers/mfd/viperboard.c
@@ -59,10 +59,8 @@ static int vprbrd_probe(struct usb_interface *interface,
 
 	/* allocate memory for our device state and initialize it */
 	vb = kzalloc(sizeof(*vb), GFP_KERNEL);
-	if (vb = NULL) {
-		dev_err(&interface->dev, "Out of memory\n");
+	if (!vb)
 		return -ENOMEM;
-	}
 
 	mutex_init(&vb->lock);
 
-- 
2.15.1


             reply	other threads:[~2018-01-16 16:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 16:42 SF Markus Elfring [this message]
2018-01-23 12:58 ` [PATCH] mfd/viperboard: Delete an error message for a failed memory allocation in vprbrd_probe() Lee Jones
2018-01-23 13:01   ` Lee Jones
2018-01-23 14:05     ` SF Markus Elfring
2018-01-23 15:14       ` Lee Jones
2018-01-23 15:56         ` mfd: Patch management? SF Markus Elfring
2018-01-23 16:31           ` Lee Jones
2018-01-23 16:49             ` SF Markus Elfring
     [not found]             ` <49873902-c947-468d-094a-4ac175850116@users.sourceforge.net>
2018-01-26 11:45               ` Lee Jones
     [not found]                 ` <c6e799c3-e118-20a1-3a9f-72950a080d03@users.sourceforge.net>
2018-01-26 14:12                   ` Lee Jones
2018-01-26 16:28                     ` SF Markus Elfring
2018-01-29  9:35                       ` Lee Jones
2018-01-29 10:15                         ` SF Markus Elfring

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=9c50fe6a-21cc-e49d-1b10-5d2457ed4e2a@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=poeschel@lemonage.de \
    --cc=sameo@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox