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

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I311264d52923d1251a92f8bddcb40f6ff36c6d2c
This commit is contained in:
Tao Huang
2025-02-17 19:32:53 +08:00
parent 061228f40c
commit b4147a79aa

View File

@@ -677,10 +677,10 @@ static void sc430cs_get_module_inf(struct sc430cs *sc430cs,
struct rkmodule_inf *inf)
{
memset(inf, 0, sizeof(*inf));
strlcpy(inf->base.sensor, SC430CS_NAME, sizeof(inf->base.sensor));
strlcpy(inf->base.module, sc430cs->module_name,
strscpy(inf->base.sensor, SC430CS_NAME, sizeof(inf->base.sensor));
strscpy(inf->base.module, sc430cs->module_name,
sizeof(inf->base.module));
strlcpy(inf->base.lens, sc430cs->len_name, sizeof(inf->base.lens));
strscpy(inf->base.lens, sc430cs->len_name, sizeof(inf->base.lens));
}
static long sc430cs_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)