gr_tmtc_1553.c: Unchecked return value from library (CID #1399785)

CID 1399785: Unchecked return value from library in gr_tmtc_1553_init1().

Closes #4289
This commit is contained in:
Ryan Long
2021-03-02 13:17:15 -05:00
committed by Joel Sherrill
parent 4c0d9c5a57
commit 5f0a7ceb81

View File

@@ -291,6 +291,7 @@ int gr_tmtc_1553_init1(struct drvmgr_dev *dev)
int status; int status;
uint32_t bar0, bar0_size; uint32_t bar0, bar0_size;
int resources_cnt; int resources_cnt;
int sc;
/* PCI device does not have the IRQ line register, when PCI autoconf configures it the configuration /* PCI device does not have the IRQ line register, when PCI autoconf configures it the configuration
* is forgotten. We take the IRQ number from the PCI Host device (AMBA device), this works as long * is forgotten. We take the IRQ number from the PCI Host device (AMBA device), this works as long
@@ -314,7 +315,8 @@ int gr_tmtc_1553_init1(struct drvmgr_dev *dev)
strcpy(priv->prefix, "/dev/tmtc1553_0"); strcpy(priv->prefix, "/dev/tmtc1553_0");
priv->prefix[14] += dev->minor_drv; priv->prefix[14] += 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[15] = '/'; priv->prefix[15] = '/';
priv->prefix[16] = '\0'; priv->prefix[16] = '\0';