mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
remove possible mutex deadlock
This commit is contained in:
parent
3063b8e88b
commit
12b792ef3f
@ -270,9 +270,10 @@ static int writebitsx(struct cxd_state *cxd, u8 Bank, u8 Address,
|
||||
mutex_lock(&cxd->mutex);
|
||||
status = readregsx_unlocked(cxd, Bank, Address, &tmp, 1);
|
||||
if (status < 0)
|
||||
return status;
|
||||
goto out;
|
||||
tmp = (tmp & ~Mask) | Value;
|
||||
status = writeregsx_unlocked(cxd, Bank, Address, &tmp, 1);
|
||||
out:
|
||||
mutex_unlock(&cxd->mutex);
|
||||
return status;
|
||||
}
|
||||
@ -286,9 +287,10 @@ static int writebitst(struct cxd_state *cxd, u8 Bank, u8 Address,
|
||||
mutex_lock(&cxd->mutex);
|
||||
status = readregst_unlocked(cxd, Bank, Address, &Tmp, 1);
|
||||
if (status < 0)
|
||||
return status;
|
||||
goto out;
|
||||
Tmp = (Tmp & ~Mask) | Value;
|
||||
status = writeregst_unlocked(cxd, Bank, Address, &Tmp, 1);
|
||||
out:
|
||||
mutex_unlock(&cxd->mutex);
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user