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

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I589c09725c9f53e67f3f001be4990078e2cc5dfd
This commit is contained in:
Tao Huang
2025-02-17 19:32:52 +08:00
parent bd1abdf2a5
commit bb13749f8a

View File

@@ -1146,10 +1146,10 @@ static void sc200ai_get_module_inf(struct sc200ai *sc200ai,
struct rkmodule_inf *inf)
{
memset(inf, 0, sizeof(*inf));
strlcpy(inf->base.sensor, SC200AI_NAME, sizeof(inf->base.sensor));
strlcpy(inf->base.module, sc200ai->module_name,
strscpy(inf->base.sensor, SC200AI_NAME, sizeof(inf->base.sensor));
strscpy(inf->base.module, sc200ai->module_name,
sizeof(inf->base.module));
strlcpy(inf->base.lens, sc200ai->len_name, sizeof(inf->base.lens));
strscpy(inf->base.lens, sc200ai->len_name, sizeof(inf->base.lens));
}
static int sc200ai_get_channel_info(struct sc200ai *sc200ai, struct rkmodule_channel_info *ch_info)