Commit 567f94ec authored by Hans Verkuil's avatar Hans Verkuil Committed by sanglipeng
Browse files

media: tuners: qt1010: replace BUG_ON with a regular error

stable inclusion
from stable-v5.10.197
commit 2ae53dd15eef90d34fc084b5b2305a67bb675a26
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I96Q8P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2ae53dd15eef90d34fc084b5b2305a67bb675a26



--------------------------------

[ Upstream commit ee630b29 ]

BUG_ON is unnecessary here, and in addition it confuses smatch.
Replacing this with an error return help resolve this smatch
warning:

drivers/media/tuners/qt1010.c:350 qt1010_init() error: buffer overflow 'i2c_data' 34 <= 34

Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 4195b685
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment