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

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

View File

@@ -884,10 +884,10 @@ static void sc2310_get_module_inf(struct sc2310 *sc2310,
struct rkmodule_inf *inf)
{
memset(inf, 0, sizeof(*inf));
strlcpy(inf->base.sensor, SC2310_NAME, sizeof(inf->base.sensor));
strlcpy(inf->base.module, sc2310->module_name,
strscpy(inf->base.sensor, SC2310_NAME, sizeof(inf->base.sensor));
strscpy(inf->base.module, sc2310->module_name,
sizeof(inf->base.module));
strlcpy(inf->base.lens, sc2310->len_name, sizeof(inf->base.lens));
strscpy(inf->base.lens, sc2310->len_name, sizeof(inf->base.lens));
}
static void sc2310_get_gain_reg(u32 val, u32 *again_reg, u32 *again_fine_reg,