-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix mutex double lock deadlock problem
- Loading branch information
AdamV
committed
Jun 23, 2020
1 parent
322a7a8
commit ce23497
Showing
2 changed files
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -892,7 +892,10 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status) | |
mutex_lock(&i2cctl_fe_mutex); | ||
|
||
r = avl62x1_get_lock_status(&lock, priv->chip); | ||
if (!r && lock == avl62x1_status_locked) | ||
|
||
safe_mutex_unlock(&i2cctl_fe_mutex); | ||
|
||
if (!r && lock == avl62x1_status_locked) | ||
{ | ||
*status = FE_HAS_SIGNAL | FE_HAS_CARRIER | | ||
FE_HAS_VITERBI | FE_HAS_SYNC | | ||
|
@@ -905,7 +908,6 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status) | |
*status = FE_HAS_SIGNAL; | ||
} | ||
|
||
safe_mutex_unlock(&i2cctl_fe_mutex); | ||
|
||
return r; | ||
} | ||
|
@@ -1704,4 +1706,4 @@ MODULE_DESCRIPTION("Availink AVL62X1 DVB-S/S2/S2X demodulator driver"); | |
MODULE_AUTHOR("Availink, Inc. ([email protected])"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_VERSION(AVL62X1_VERSION); | ||
MODULE_FIRMWARE(AVL62X1_FIRMWARE); | ||
MODULE_FIRMWARE(AVL62X1_FIRMWARE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters