mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 01:10:54 +07:00
media: dvb: Add check on sp8870_readreg return
[ Upstream commit c6d822c56e7fd29e6fa1b1bb91b98f6a1e942b3c ] 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: Alaa Emad <alaaemadhossney.ae@gmail.com> Link: https://lore.kernel.org/r/20210503115736.2104747-60-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7dae0ca98a
commit
9fd73df80f
@ -280,7 +280,9 @@ static int sp8870_set_frontend_parameters(struct dvb_frontend *fe)
|
||||
sp8870_writereg(state, 0xc05, reg0xc05);
|
||||
|
||||
// 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
|
||||
sp8870_microcontroller_start(state);
|
||||
|
Loading…
Reference in New Issue
Block a user