From 063b811f34650bf88e24998eb9c094607cb3b53e Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 1 Feb 2021 09:40:56 +0100 Subject: media: uvc: strncpy -> strscpy The use of strncpy is discouraged, use strscpy instead. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/uvc/uvc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb') 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); -- cgit v1.2.3