summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/rtl2830.h
diff options
context:
space:
mode:
authorDaniel Scheller <d.scheller@gmx.net>2017-08-23 12:09:58 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-27 06:35:13 -0400
commit6b852620fa75d3137929538b4a9aec2f953ff03c (patch)
treecba4ee9ccc44b17acfe77d73505ec92709cd74f7 /drivers/media/dvb-frontends/rtl2830.h
parente59eb4adf0d79fe7692c08c07445ec9efc8ddc1c (diff)
downloadblackbird-op-linux-6b852620fa75d3137929538b4a9aec2f953ff03c.tar.gz
blackbird-op-linux-6b852620fa75d3137929538b4a9aec2f953ff03c.zip
media: dvb-frontends/stv0910: release lock on gate_ctrl() failure
Whenever write_reg() fails to open/close the demod's I2C gate, release the lock to avoid deadlocking situations. If I2c gate open failed, there's no need to hold a lock, and if close fails, the mutex_unlock() at the end of the function is never reached, leaving the mutex_lock in locked state, which in turn will cause potential for deadlocks. Thus, release the lock on failure. While we're touching gate_ctrl(), add some explanation about the need for locking and the shared I2C bus/gate. Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/rtl2830.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud