mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
throw a warning on double unlocks
based on patch by Daniel Scheller
This commit is contained in:
parent
b54e6ed689
commit
d87246de12
@ -1210,10 +1210,15 @@ static int gate_ctrl(struct dvb_frontend *fe, int enable)
|
|||||||
|
|
||||||
stat = write_reg(state, state->nr ? RSTV0910_P2_I2CRPT :
|
stat = write_reg(state, state->nr ? RSTV0910_P2_I2CRPT :
|
||||||
RSTV0910_P1_I2CRPT, i2crpt);
|
RSTV0910_P1_I2CRPT, i2crpt);
|
||||||
|
if (stat < 0)
|
||||||
|
if (!WARN_ON(!mutex_is_locked(&state->base->i2c_lock)))
|
||||||
|
mutex_unlock(&state->base->i2c_lock);
|
||||||
|
|
||||||
state->i2crpt = i2crpt;
|
state->i2crpt = i2crpt;
|
||||||
|
|
||||||
if (!enable)
|
if (!enable)
|
||||||
mutex_unlock(&state->base->i2c_lock);
|
if (!WARN_ON(!mutex_is_locked(&state->base->i2c_lock)))
|
||||||
|
mutex_unlock(&state->base->i2c_lock);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user