Call nxsem_destroy or nxmutex_destry in the error path

1.Don't check the return value of nxsem_init or nxmutex_init
2.Fix some style issue

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
anjiahao
2022-09-06 14:18:45 +08:00
committed by Petro Karashchenko
parent 99cfffc96a
commit d7b4e91dda
53 changed files with 606 additions and 619 deletions

View File

@@ -435,7 +435,7 @@ static ssize_t cc1101_file_write(FAR struct file *filep,
return ret;
}
ret = cc1101_write(dev, (const uint8_t *)buffer, buflen);
ret = cc1101_write(dev, (FAR const uint8_t *)buffer, buflen);
cc1101_send(dev);
nxmutex_unlock(&dev->devlock);
return ret;
@@ -560,7 +560,7 @@ static ssize_t cc1101_file_read(FAR struct file *filep, FAR char *buffer,
return ret;
}
buflen = fifo_get(dev, (uint8_t *)buffer, buflen);
buflen = fifo_get(dev, (FAR uint8_t *)buffer, buflen);
nxmutex_unlock(&dev->devlock);
return buflen;
}