From: Armin Wolf <W_Armin@gmx.de>
To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] platform/x86: wmi: Remove unnecessary out-of-memory message
Date: Tue, 6 Feb 2024 23:04:46 +0100 [thread overview]
Message-ID: <20240206220447.3102-3-W_Armin@gmx.de> (raw)
In-Reply-To: <20240206220447.3102-1-W_Armin@gmx.de>
If kzalloc() fails, an out-of-memory message is already
printed. Remove the unnecessary second warning message.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/platform/x86/wmi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 545d6696d7cb..396344523bce 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1127,10 +1127,8 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev)
continue;
wblock = kzalloc(sizeof(*wblock), GFP_KERNEL);
- if (!wblock) {
- dev_err(wmi_bus_dev, "Failed to allocate %pUL\n", &gblock[i].guid);
+ if (!wblock)
continue;
- }
wblock->acpi_device = device;
wblock->gblock = gblock[i];
--
2.39.2
next prev parent reply other threads:[~2024-02-06 22:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 22:04 [PATCH 1/4] platform/x86: wmi: Check if WMxx control method exists Armin Wolf
2024-02-06 22:04 ` [PATCH 2/4] platform/x86: wmi: Use FW_BUG when warning about missing control methods Armin Wolf
2024-02-06 22:04 ` Armin Wolf [this message]
2024-02-06 22:04 ` [PATCH 4/4] platform/x86: wmi: Replace pr_err() with dev_err() Armin Wolf
2024-02-07 13:52 ` [PATCH 1/4] platform/x86: wmi: Check if WMxx control method exists Ilpo Järvinen
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=20240206220447.3102-3-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--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®