mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
drivers/bch: BCH character driver bch_ioctl() always returns -ENOTTY for DIOC_GETPRIV command. It should returns OK if DIOC_GETPRIV command succeeds.
This commit is contained in:
committed by
Gregory Nutt
parent
b8e7d5c455
commit
5ef00f0b91
@@ -339,12 +339,13 @@ static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
bchlib_semtake(bch);
|
||||
if (!bchr || bch->refs == MAX_OPENCNT)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
bch->refs++;
|
||||
*bchr = bch;
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
bchlib_semgive(bch);
|
||||
|
||||
Reference in New Issue
Block a user