diff --git a/lib/remoteproc/remoteproc.c b/lib/remoteproc/remoteproc.c index 3ac4a1bb..52a52a69 100644 --- a/lib/remoteproc/remoteproc.c +++ b/lib/remoteproc/remoteproc.c @@ -6,6 +6,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include #include @@ -306,7 +307,7 @@ void remoteproc_init_mem(struct remoteproc_mem *mem, const char *name, if (!mem || !io || size == 0) return; if (name) - strncpy(mem->name, name, sizeof(mem->name)); + (void)strlcpy(mem->name, name, sizeof(mem->name)); else mem->name[0] = 0; mem->pa = pa;