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:
EunBong Song
2017-05-16 08:01:05 -06:00
committed by Gregory Nutt
parent b8e7d5c455
commit 5ef00f0b91
+2 -1
View File
@@ -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);