Skip to contentSkip to conversation

mailbox/pcc: Delete an error message for a failed memory allocation in acpi_pcc_probe()

PATCH New SF Markus Elfring 1 participant 1 message Jan 16, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox/pcc: Delete an error message for a failed memory allocation in acpi_pcc_probe()

From: Markus Elfring <[email protected]>
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.

---
 drivers/mailbox/pcc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mailbox/pcc.c +1 -3
index 3ef7f036ceea..78097ae183ec 100644
@@ -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) {
Signature · 1 line
2.15.1