From: SF Markus Elfring <elfring@users.sourceforge.net>
To: platform-driver-x86@vger.kernel.org,
"Andy Shevchenko" <andy@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Pali Rohár" <pali.rohar@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] platform/x86/dell-smo8800: Delete an error message for a failed memory allocation in smo8800_add()
Date: Tue, 19 Dec 2017 21:18:27 +0100 [thread overview]
Message-ID: <3ce85d6b-6b25-2988-960b-84fa0b7a8c61@users.sourceforge.net> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 19 Dec 2017 21:12:10 +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/platform/x86/dell-smo8800.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/platform/x86/dell-smo8800.c b/drivers/platform/x86/dell-smo8800.c
index 1d87237bc731..9590d5e7c5ca 100644
--- a/drivers/platform/x86/dell-smo8800.c
+++ b/drivers/platform/x86/dell-smo8800.c
@@ -150,10 +150,8 @@ static int smo8800_add(struct acpi_device *device)
struct smo8800_device *smo8800;
smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL);
- if (!smo8800) {
- dev_err(&device->dev, "failed to allocate device data\n");
+ if (!smo8800)
return -ENOMEM;
- }
smo8800->dev = &device->dev;
smo8800->miscdev.minor = MISC_DYNAMIC_MINOR;
--
2.15.1
reply other threads:[~2017-12-19 20:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3ce85d6b-6b25-2988-960b-84fa0b7a8c61@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®