You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2021/05/20 05:24:18 UTC

[incubator-nuttx] 21/21: arch: cxd56xx: Fix parameter check of hostif buffer

This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 6b5a4cbfd36947407747c42874cd4f5b41a91f86
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed May 19 17:04:54 2021 +0900

    arch: cxd56xx: Fix parameter check of hostif buffer
    
    Fix a parameter check of the buffer attribute in opening hostif driver.
---
 arch/arm/src/cxd56xx/cxd56_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_hostif.c b/arch/arm/src/cxd56xx/cxd56_hostif.c
index c0d3934..522e11d 100644
--- a/arch/arm/src/cxd56xx/cxd56_hostif.c
+++ b/arch/arm/src/cxd56xx/cxd56_hostif.c
@@ -211,7 +211,7 @@ static int hif_open(FAR struct file *filep)
     }
 
   if ((filep->f_oflags & O_WRONLY) &&
-      ((priv->flags & HOSTIF_BUFF_ATTR_WRITE) != 0))
+      ((priv->flags & HOSTIF_BUFF_ATTR_READ) != 0))
     {
       return -EINVAL;
     }