aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorJoel Fernandes (Google) <[email protected]>2023-07-29 14:27:32 +0000
committerFrederic Weisbecker <[email protected]>2023-09-13 22:27:41 +0200
commitf0a31b26be1f725e3f56beed76486c1b034120b3 (patch)
tree5f6e7c6e0c0f62597f6b3f7800969cce50afd901 /tools/perf/scripts/python/bin/export-to-postgresql-report
parentff18cb816427c3738d5d3fd23b7939a813935e15 (diff)
srcu: Fix error handling in init_srcu_struct_fields()
The current error handling in init_srcu_struct_fields() is a bit inconsistent. If init_srcu_struct_nodes() fails, the function either returns -ENOMEM or 0 depending on whether ssp->sda_is_static is true or false. This can make init_srcu_struct_fields() return 0 even if memory allocation failed! Simplify the error handling by always returning -ENOMEM if either init_srcu_struct_nodes() or the per-CPU allocation fails. This makes the control flow easier to follow and avoids the inconsistent return values. Add goto labels to avoid duplicating the error cleanup code. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joel Fernandes (Google) <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions