diff options
author | Russell Currey <ruscur@russell.cc> | 2023-02-10 11:03:38 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-02-12 14:12:36 +0300 |
commit | c9fd2952754a03b2c14433c0318f4b46e9c0f2ef (patch) | |
tree | 9b8b11931015c5ac11c454be8e0d7a60029f6cd8 /arch/powerpc/platforms/powernv | |
parent | fcf63d6b8ab9b12c2ce1b4bde12a3c391029c998 (diff) | |
download | linux-c9fd2952754a03b2c14433c0318f4b46e9c0f2ef.tar.xz |
powerpc/secvar: Fix incorrect return in secvar_sysfs_load()
secvar_ops->get_next() returns -ENOENT when there are no more variables
to return, which is expected behaviour.
Fix this by returning 0 if get_next() returns -ENOENT.
This fixes an issue introduced in commit bd5d9c743d38 ("powerpc: expose
secure variables to userspace via sysfs"), but the return code of
secvar_sysfs_load() was never checked so this issue never mattered.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-4-ajd@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/powernv')
0 files changed, 0 insertions, 0 deletions