“1da177e4c3f41524e886b7f1b8a0c1fc7321cac2”上不存在“arch/sparc/include/asm/sun4paddr.h”
提交 343e8c99 编写于 作者: A Alaa Emad 提交者: Yang Yingliang

media: dvb: Add check on sp8870_readreg return

[ Upstream commit c6d822c5 ]

The function sp8870_readreg returns a negative value when i2c_transfer
fails so properly check for this and return the error if it happens.

Cc: Sean Young <sean@mess.org>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: NAlaa Emad <alaaemadhossney.ae@gmail.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-60-gregkh@linuxfoundation.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ca170e6d
...@@ -293,7 +293,9 @@ static int sp8870_set_frontend_parameters(struct dvb_frontend *fe) ...@@ -293,7 +293,9 @@ static int sp8870_set_frontend_parameters(struct dvb_frontend *fe)
sp8870_writereg(state, 0xc05, reg0xc05); sp8870_writereg(state, 0xc05, reg0xc05);
// read status reg in order to clear pending irqs // read status reg in order to clear pending irqs
sp8870_readreg(state, 0x200); err = sp8870_readreg(state, 0x200);
if (err < 0)
return err;
// system controller start // system controller start
sp8870_microcontroller_start(state); sp8870_microcontroller_start(state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册