diff options
| author | Christophe Leroy <[email protected]> | 2021-12-02 12:00:20 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2021-12-23 11:35:24 +0000 |
| commit | a3483c3dd18c136785a31406fe27210649fc4fba (patch) | |
| tree | b7893804ec9882ee7138335a10bd6d6803998aab /arch/powerpc/lib/test-code-patching.c | |
| parent | powerpc/code-patching: Fix error handling in do_patch_instruction() (diff) | |
| download | kernel-a3483c3dd18c136785a31406fe27210649fc4fba.tar.gz kernel-a3483c3dd18c136785a31406fe27210649fc4fba.zip | |
powerpc/code-patching: Fix unmap_patch_area() error handling
pXd_offset() doesn't return NULL. When the base is NULL, it
still adds the offset.
Use pXd_none() to check validity instead. It also improves
performance by folding out none existing levels as pXd_none()
always returns 0 in that case.
Such an error is unexpected, use WARN_ON() so that the caller
doesn't have to worry about it, and drop the returned value.
And now that unmap_patch_area() doesn't return error, we can
take into account the error returned by __patch_instruction().
While at it, remove the 'inline' property which is useless.
Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/299804b117fae35c786c827536c91f25352e279b.1638446239.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/lib/test-code-patching.c')
0 files changed, 0 insertions, 0 deletions
