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

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3b8be8f67f300d9cb4a378b00353ef62455918ec
This commit is contained in:
Tao Huang
2025-02-17 19:32:45 +08:00
parent 4cb6bd68d6
commit 71b563f00a

View File

@@ -610,10 +610,10 @@ static void gc02m2_get_module_inf(struct gc02m2 *gc02m2,
struct rkmodule_inf *inf)
{
memset(inf, 0, sizeof(*inf));
strlcpy(inf->base.sensor, GC02M2_NAME, sizeof(inf->base.sensor));
strlcpy(inf->base.module, gc02m2->module_name,
strscpy(inf->base.sensor, GC02M2_NAME, sizeof(inf->base.sensor));
strscpy(inf->base.module, gc02m2->module_name,
sizeof(inf->base.module));
strlcpy(inf->base.lens, gc02m2->len_name, sizeof(inf->base.lens));
strscpy(inf->base.lens, gc02m2->len_name, sizeof(inf->base.lens));
}
static long gc02m2_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)