Skip to content

Commit

Permalink
media: dvb: Add check on sp8870_readreg
Browse files Browse the repository at this point in the history
In sp8870_set_frontend_parameters, the function sp8870_readreg
may return an error when i2c_transfer fails. The fix checks for
this error and returns upstream consistent with other invocations.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
  • Loading branch information
Aditya Pakki authored and mchehab committed Jan 16, 2019
1 parent 0f787c1 commit 467a37f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/dvb-frontends/sp8870.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,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)
return err;

// system controller start
sp8870_microcontroller_start(state);
Expand Down

0 comments on commit 467a37f

Please sign in to comment.