drivers/lcd/pcf8574: driver lock should in pairs
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
5f795a4f0d
commit
6950ea4646
@ -1064,6 +1064,7 @@ static int pcf8574_lcd_open(FAR struct file *filep)
|
|||||||
nxmutex_lock(&priv->lock);
|
nxmutex_lock(&priv->lock);
|
||||||
if (priv->refs == MAX_OPENCNT)
|
if (priv->refs == MAX_OPENCNT)
|
||||||
{
|
{
|
||||||
|
nxmutex_unlock(&priv->lock);
|
||||||
return -EMFILE;
|
return -EMFILE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user