[PATCH] powerpc/perf/hv-24x7: Delete an error message for a failed memory allocation in create_events_from_catalog()

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3232d

2 messages, 2 authors, 2017-10-05 · open the first message on its own page

[PATCH] powerpc/perf/hv-24x7: Delete an error message for a failed memory allocation in create_events_from_catalog()

From: SF Markus Elfring <hidden>
Date: 2017-10-05 16:08:24

From: Markus Elfring <redacted>
Date: Thu, 5 Oct 2017 18:02:05 +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>
---
 arch/powerpc/perf/hv-24x7.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 9c88b82f6229..f21f30aaf9bd 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -766,7 +766,6 @@ static int create_events_from_catalog(struct attribute ***events_,
 	 */
 	event_data = vmalloc(event_data_bytes);
 	if (!event_data) {
-		pr_err("could not allocate event data\n");
 		ret = -ENOMEM;
 		goto e_free;
 	}
-- 
2.14.2

Re: [PATCH] powerpc/perf/hv-24x7: Delete an error message for a failed memory allocation in create_events_from_catalog()

From: Thiago Jung Bauermann <hidden>
Date: 2017-10-05 19:06:07

Thanks, Markus.

SF Markus Elfring [off-list ref] writes:
quoted hunk
From: Markus Elfring <redacted>
Date: Thu, 5 Oct 2017 18:02:05 +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>
---
 arch/powerpc/perf/hv-24x7.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 9c88b82f6229..f21f30aaf9bd 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -766,7 +766,6 @@ static int create_events_from_catalog(struct attribute ***events_,
 	 */
 	event_data = vmalloc(event_data_bytes);
 	if (!event_data) {
-		pr_err("could not allocate event data\n");
 		ret = -ENOMEM;
 		goto e_free;
 	}
Reviewed-by: Thiago Jung Bauermann <redacted> 

-- 
Thiago Jung Bauermann
IBM Linux Technology Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help