Commit e7dd89ce authored by Hans Petter Selasky's avatar Hans Petter Selasky Committed by Mauro Carvalho Chehab

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: default avatarHans Petter Selasky <hps@selasky.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: added commit message]
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 6f3f3e11
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment