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

From: SF Markus Elfring
Date: Tue Jan 16 2018 - 15:04:14 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
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