mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf: Remove superfluous allocation error check
If the get_callchain_buffers fails to allocate the buffer it will decrease the nr_callchain_events right away. There's no point of checking the allocation error for nr_callchain_events > 1. Removing that check. Signed-off-by: Jiri Olsa <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
5af44ca53d
commit
bfb3d7b8b9
1 changed files with 2 additions and 8 deletions
|
|
@ -131,14 +131,8 @@ int get_callchain_buffers(int event_max_stack)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (count > 1) {
|
||||
/* If the allocation failed, give up */
|
||||
if (!callchain_cpus_entries)
|
||||
err = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
err = alloc_callchain_buffers();
|
||||
if (count == 1)
|
||||
err = alloc_callchain_buffers();
|
||||
exit:
|
||||
if (err)
|
||||
atomic_dec(&nr_callchain_events);
|
||||
|
|
|
|||
Loading…
Reference in a new issue