mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mailbox/pcc: Delete an error message for a failed memory allocation in acpi_pcc_probe()
@ 2018-01-16 20:04 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-16 20:04 UTC (permalink / raw)
  To: kernel-janitors, Andrew Morton, Jassi Brar; +Cc: LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jan 2018 20:55:22 +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/mailbox/pcc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 3ef7f036ceea..78097ae183ec 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -478,10 +478,8 @@ static int __init acpi_pcc_probe(void)
 
 	pcc_mbox_channels = kzalloc(sizeof(struct mbox_chan) *
 			sum, GFP_KERNEL);
-	if (!pcc_mbox_channels) {
-		pr_err("Could not allocate space for PCC mbox channels\n");
+	if (!pcc_mbox_channels)
 		return -ENOMEM;
-	}
 
 	pcc_doorbell_vaddr = kcalloc(sum, sizeof(void *), GFP_KERNEL);
 	if (!pcc_doorbell_vaddr) {
-- 
2.15.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-16 20:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 20:04 [PATCH] mailbox/pcc: Delete an error message for a failed memory allocation in acpi_pcc_probe() SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome