aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/ethosu_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/ethosu_device.c b/kernel/ethosu_device.c
index 6e2351d..32fb012 100644
--- a/kernel/ethosu_device.c
+++ b/kernel/ethosu_device.c
@@ -334,11 +334,11 @@ static long ethosu_ioctl(struct file *file,
static struct rpmsg_endpoint *ethosu_create_ept(struct rpmsg_device *rpdev)
{
struct device *dev = &rpdev->dev;
- struct rpmsg_channel_info info;
+ struct rpmsg_channel_info info = { 0 };
struct rpmsg_endpoint *ept;
/* Create rpmsg endpoint */
- strncpy(info.name, rpdev->id.name, sizeof(info.name));
+ strncpy(info.name, rpdev->id.name, sizeof(info.name) - 1);
info.src = 0;
info.dst = rpdev->dst;