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

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If8b4361853f053c758945c2d829256a510ea9f72
This commit is contained in:
Tao Huang
2025-02-17 19:32:48 +08:00
parent 56e0ce250d
commit fe5a885049

View File

@@ -1313,10 +1313,10 @@ static void imx307_get_module_inf(struct imx307 *imx307,
struct rkmodule_inf *inf)
{
memset(inf, 0, sizeof(*inf));
strlcpy(inf->base.sensor, IMX307_NAME, sizeof(inf->base.sensor));
strlcpy(inf->base.module, imx307->module_name,
strscpy(inf->base.sensor, IMX307_NAME, sizeof(inf->base.sensor));
strscpy(inf->base.module, imx307->module_name,
sizeof(inf->base.module));
strlcpy(inf->base.lens, imx307->len_name, sizeof(inf->base.lens));
strscpy(inf->base.lens, imx307->len_name, sizeof(inf->base.lens));
}
static int imx307_set_conversion_gain(struct imx307 *imx307, u32 *cg)