[rtems commit] gr_cpci_gr740.c: Unchecked return value from library ( CID #1437630)
Joel Sherrill
joel at rtems.org
Fri Mar 5 20:19:38 UTC 2021
Module: rtems
Branch: master
Commit: f804778881334484724b42335cac5dedaa242ed7
Changeset: http://git.rtems.org/rtems/commit/?id=f804778881334484724b42335cac5dedaa242ed7
Author: Ryan Long <ryan.long at oarcorp.com>
Date: Tue Mar 2 13:25:53 2021 -0500
gr_cpci_gr740.c: Unchecked return value from library (CID #1437630)
CID 1437630: Unchecked return value from library in gr_cpci_gr740_init1().
Closes #4290
---
bsps/sparc/shared/pci/gr_cpci_gr740.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bsps/sparc/shared/pci/gr_cpci_gr740.c b/bsps/sparc/shared/pci/gr_cpci_gr740.c
index 95f5b94..96cb219 100644
--- a/bsps/sparc/shared/pci/gr_cpci_gr740.c
+++ b/bsps/sparc/shared/pci/gr_cpci_gr740.c
@@ -455,6 +455,7 @@ int gr_cpci_gr740_init1(struct drvmgr_dev *dev)
int status, i;
union drvmgr_key_value *value;
int resources_cnt;
+ int sc;
priv = dev->priv;
if (!priv)
@@ -471,7 +472,8 @@ int gr_cpci_gr740_init1(struct drvmgr_dev *dev)
strcpy(priv->prefix, "/dev/gr740_0");
priv->prefix[11] += dev->minor_drv;
- mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
+ sc = mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
+ _Assert_Unused_variable_equals(sc, 0);
priv->prefix[12] = '/';
priv->prefix[13] = '\0';
More information about the vc
mailing list