Thread (6 messages) 6 messages, 4 authors, 2017-09-05

Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry()

flat view

From: Evgeniy Polyakov <hidden>
Date: 2017-09-05 13:11:02
Also in: kernel-janitors, lkml

Hi everyone

27.08.2017, 22:25, "SF Markus Elfring" [off-list ref]:
From: Markus Elfring <redacted>
Date: Sun, 27 Aug 2017 21:18:37 +0200

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 <redacted>
Looks good to me, thanks Markus.
There is virtually zero useful information in this print if we are in the situation, when kernel can not allocate
a few bytes to run connector queue.

Acked-by: Evgeniy Polyakov <redacted>

kernel-janitors@ please queue this patch up
quoted hunk ↗ jump to hunk
---
 drivers/connector/cn_queue.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c
index 1f8bf054d11c..e4f31d679f02 100644
--- a/drivers/connector/cn_queue.c
+++ b/drivers/connector/cn_queue.c
@@ -40,10 +40,8 @@ cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name,
         struct cn_callback_entry *cbq;

         cbq = kzalloc(sizeof(*cbq), GFP_KERNEL);
- if (!cbq) {
- pr_err("Failed to create new callback queue.\n");
+ if (!cbq)
                 return NULL;
- }

         atomic_set(&cbq->refcnt, 1);

--
2.14.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help