diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2021-10-26 15:20:04 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2021-10-26 15:20:04 +0200 |
commit | e7456f7adbaac0ec15a61b4b3a172cc4241ebb34 (patch) | |
tree | c25c2e74a0c4ca658cc7766501709762e040c057 /arch/s390/lib | |
parent | 1a446b24730e78777078c4e2d24ba71dbf06a213 (diff) | |
parent | 8b7216439e2e2128f6f1a19ad4b6be94d8b0e23d (diff) | |
download | linux-e7456f7adbaac0ec15a61b4b3a172cc4241ebb34.tar.bz2 |
Merge branch 'fixes' into features
pci and string functions changes on features depend on changes from the
fixes branch.
* fixes:
s390: add Alexander Gordeev as reviewer
s390: fix strrchr() implementation
vfio-ccw: step down as maintainer
KVM: s390: remove myself as reviewer
s390/pci: fix zpci_zdev_put() on reserve
bpf, s390: Fix potential memory leak about jit_data
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/lib')
-rw-r--r-- | arch/s390/lib/string.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c index cfcdf76d6a95..a95ca6df4e5e 100644 --- a/arch/s390/lib/string.c +++ b/arch/s390/lib/string.c @@ -259,14 +259,13 @@ EXPORT_SYMBOL(strcmp); #ifdef __HAVE_ARCH_STRRCHR char *strrchr(const char *s, int c) { - size_t len = __strend(s) - s; - - if (len) - do { - if (s[len] == (char) c) - return (char *) s + len; - } while (--len > 0); - return NULL; + ssize_t len = __strend(s) - s; + + do { + if (s[len] == (char)c) + return (char *)s + len; + } while (--len >= 0); + return NULL; } EXPORT_SYMBOL(strrchr); #endif |