mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-22 16:34:37 +07:00
media: strscpy() returns a negative value on failure unlike strlcpy().
strscpy() returns a negative value on failure unlike strlcpy(), so fix the WARN_ON accordingly. Signed-off-by: Hans Petter Selasky <hps@selasky.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: added commit message] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
6f3f3e1199
commit
e7dd89cef1
@ -1373,7 +1373,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
|
||||
}
|
||||
|
||||
if (descr)
|
||||
WARN_ON(strscpy(fmt->description, descr, sz) >= sz);
|
||||
WARN_ON(strscpy(fmt->description, descr, sz) < 0);
|
||||
fmt->flags = flags;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user