media: i2c: gc2385: move from strlcpy with unused retval to strscpy

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7689871e299b22d19c38f0654b46d24c3a52955d
This commit is contained in:
Tao Huang
2025-02-17 19:32:47 +08:00
parent 420b0817ff
commit 03bf83efce

View File

@@ -452,10 +452,10 @@ static void gc2385_get_module_inf(struct gc2385 *gc2385,
struct rkmodule_inf *inf)
{
memset(inf, 0, sizeof(*inf));
strlcpy(inf->base.sensor, GC2385_NAME, sizeof(inf->base.sensor));
strlcpy(inf->base.module, gc2385->module_name,
strscpy(inf->base.sensor, GC2385_NAME, sizeof(inf->base.sensor));
strscpy(inf->base.module, gc2385->module_name,
sizeof(inf->base.module));
strlcpy(inf->base.lens, gc2385->len_name, sizeof(inf->base.lens));
strscpy(inf->base.lens, gc2385->len_name, sizeof(inf->base.lens));
}
static long gc2385_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)