OSDN Git Service

media: lgdt3306a: fix a missing check of return value
authorKangjie Lu <kjlu@umn.edu>
Thu, 20 Dec 2018 07:48:42 +0000 (02:48 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 16 Jan 2019 16:43:48 +0000 (11:43 -0500)
commitc9b7d8f252a5a6f8ca6e948151367cbc7bc4b776
tree1e833b698a630062e814a65d89889387a6e85539
parentf27dd0ad68850fdb806536a733a32d8f74810f1e
media: lgdt3306a: fix a missing check of return value

If lgdt3306a_read_reg() fails, the read data in "val" is incorrect, thus
shouldn't be further used. The fix inserts a check for the return value
of lgdt3306a_read_reg(). If it fails, goto fail.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/dvb-frontends/lgdt3306a.c