summaryrefslogtreecommitdiff
path: root/drivers/misc/c2port/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/c2port/core.c')
-rw-r--r--drivers/misc/c2port/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
index 33bba1802289..80d87e8a0bea 100644
--- a/drivers/misc/c2port/core.c
+++ b/drivers/misc/c2port/core.c
@@ -923,7 +923,7 @@ struct c2port_device *c2port_device_register(char *name,
}
dev_set_drvdata(c2dev->dev, c2dev);
- strncpy(c2dev->name, name, C2PORT_NAME_LEN);
+ strncpy(c2dev->name, name, C2PORT_NAME_LEN - 1);
c2dev->ops = ops;
mutex_init(&c2dev->mutex);