]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pasemi: Use strscpy instead of strlcpy
authorRussell Currey <ruscur@russell.cc>
Sat, 27 Aug 2022 06:39:46 +0000 (16:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 6 Sep 2022 01:03:04 +0000 (11:03 +1000)
commitd0254f42f4db0192052b57b481b09a6e1ea9b3ff
tree4f0c2d3375bcdcecc03ad7d3e80fa53cdc6dda33
parent815b202d0abbe7b9f35afe1ae42053dc84270724
powerpc/pasemi: Use strscpy instead of strlcpy

find_i2c_driver() contained the last usage of strlcpy() in arch/powerpc.
The return value was used to check if strlen(src) >= n, for which
strscpy() returns -E2BIG.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220827063946.9073-1-ruscur@russell.cc
arch/powerpc/platforms/pasemi/misc.c