diff options
| author | Harald Freudenberger <freude@linux.ibm.com> | 2026-07-22 16:29:47 +0200 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2026-07-30 00:29:09 +0200 |
| commit | e6b197e8ec842b0d5b16bf414de72d2c4b545a09 (patch) | |
| tree | d3b96e42fa7feb19a7476d6534fd42bcd91de123 /tools/perf/scripts/python/bin | |
| parent | 2ba7ea7cb0b7bcd03906834235cfb4a73b6ec38a (diff) | |
s390/pkey: Rework ioctl functions error paths
With the pkey rework there was the suggestion to rework the error and
free paths of the pkey ioctl functions. The complain was especially to
rewrite the failure handling with goto instead of all repeat the
nearly same code (kfree(), kfree_sensitive(), memzero_explicit()) for
each path. This patch removes all this duplicated code and introduces
one code block at the end of the functions which is jumped into via
goto out or executed on regular exit. As some helper functions return
an error pointer value (which is NOT NULL) make sure on the error path
there is not by accident kfree() or similar called on such ptr values.
Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Finn Callies <fcallies@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
