* [PATCH] firmware-gsmi: Delete an error message for a failed memory allocation in gsmi_buf_alloc()
@ 2018-02-11 21:26 ` SF Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2018-02-11 21:26 UTC (permalink / raw)
To: kernel-janitors, Jean Delvare; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 11 Feb 2018 22:22:02 +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/firmware/google/gsmi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index c8f169bf2e27..fbf661e0b784 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -138,10 +138,8 @@ static struct gsmi_buf *gsmi_buf_alloc(void)
struct gsmi_buf *smibuf;
smibuf = kzalloc(sizeof(*smibuf), GFP_KERNEL);
- if (!smibuf) {
- printk(KERN_ERR "gsmi: out of memory\n");
+ if (!smibuf)
return NULL;
- }
/* allocate buffer in 32bit address space */
smibuf->start = dma_pool_alloc(gsmi_dev.dma_pool, GFP_KERNEL,
--
2.16.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] firmware-gsmi: Delete an error message for a failed memory allocation in gsmi_buf_alloc()
@ 2018-02-11 21:26 ` SF Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2018-02-11 21:26 UTC (permalink / raw)
To: kernel-janitors, Jean Delvare; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 11 Feb 2018 22:22:02 +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/firmware/google/gsmi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index c8f169bf2e27..fbf661e0b784 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -138,10 +138,8 @@ static struct gsmi_buf *gsmi_buf_alloc(void)
struct gsmi_buf *smibuf;
smibuf = kzalloc(sizeof(*smibuf), GFP_KERNEL);
- if (!smibuf) {
- printk(KERN_ERR "gsmi: out of memory\n");
+ if (!smibuf)
return NULL;
- }
/* allocate buffer in 32bit address space */
smibuf->start = dma_pool_alloc(gsmi_dev.dma_pool, GFP_KERNEL,
--
2.16.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-11 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11 21:26 [PATCH] firmware-gsmi: Delete an error message for a failed memory allocation in gsmi_buf_alloc() SF Markus Elfring
2018-02-11 21:26 ` SF Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.