diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 23:20:42 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 20:32:17 +0300 |
commit | cc1e6315e83db0e517dd9279050b88adc83a7eba (patch) | |
tree | 2fab5c7b2a4f3f50a045357a41c419fccc975de2 /drivers/media/i2c/lm3560.c | |
parent | c0decac19da3906d9b66291e57b7759489e1170f (diff) | |
download | linux-cc1e6315e83db0e517dd9279050b88adc83a7eba.tar.xz |
media: replace strcpy() by strscpy()
The strcpy() function is being deprecated upstream. Replace
it by the safer strscpy().
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/lm3560.c')
-rw-r--r-- | drivers/media/i2c/lm3560.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c index 49c6644cbba7..f122f03bd6b7 100644 --- a/drivers/media/i2c/lm3560.c +++ b/drivers/media/i2c/lm3560.c @@ -362,7 +362,8 @@ static int lm3560_subdev_init(struct lm3560_flash *flash, v4l2_i2c_subdev_init(&flash->subdev_led[led_no], client, &lm3560_ops); flash->subdev_led[led_no].flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - strcpy(flash->subdev_led[led_no].name, led_name); + strscpy(flash->subdev_led[led_no].name, led_name, + sizeof(flash->subdev_led[led_no].name)); rval = lm3560_init_controls(flash, led_no); if (rval) goto err_out; |