diff options
author | Hans Verkuil | 2021-02-01 09:40:56 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2021-02-05 23:53:20 +0100 |
commit | 063b811f34650bf88e24998eb9c094607cb3b53e (patch) | |
tree | 7d099baa2305206ab53b67f5a341c1f058826762 | |
parent | c90c103c8dc42a6d236491cf9f80145a5aaf968d (diff) |
media: uvc: strncpy -> strscpy
The use of strncpy is discouraged, use strscpy instead.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | drivers/media/usb/uvc/uvc_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 1abc122a0977..30ef2a3110f7 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1553,7 +1553,7 @@ static int uvc_gpio_parse(struct uvc_device *dev) unit->gpio.bmControls[0] = 1; unit->get_cur = uvc_gpio_get_cur; unit->get_info = uvc_gpio_get_info; - strncpy(unit->name, "GPIO", sizeof(unit->name) - 1); + strscpy(unit->name, "GPIO", sizeof(unit->name)); list_add_tail(&unit->list, &dev->entities); |