diff options
| author | Jiri Slaby <[email protected]> | 2020-02-19 09:41:01 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2020-02-21 10:24:33 +0100 |
| commit | 30fafd92c272d238efe781a5daeaa4af2824067a (patch) | |
| tree | 54af8ed2a311b4883184a334015049e4971e3c27 /tools/perf/scripts/python | |
| parent | c549725ff85ab2dee1b8453a92ab437150ece800 (diff) | |
n_hdlc: simplify freeing of buffer list
n_hdlc_release contains four loops to free each buffer list. Create a
helper (n_hdlc_free_buf_list) and call it for every list instead. It
makes n_hdlc_release more readable.
We are switching from "for (;;)" to "do {} while (buf)" which avoids the
"if (buf)" completely -- kfree is a nop for NULL pointers.
Signed-off-by: Jiri Slaby <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions