grspw.c: Fix Unchecked return value (CID #1399781)

CID 1399781: Unchecked return value in grspw_device_init().

Closes #4259
This commit is contained in:
Ryan Long
2021-03-01 11:06:48 -05:00
committed by Joel Sherrill
parent 6ebf376bf2
commit 1eaf4e461f

View File

@@ -465,6 +465,7 @@ int grspw_device_init(GRSPW_DEV *pDev)
struct amba_dev_info *ambadev;
struct ambapp_core *pnpinfo;
union drvmgr_key_value *value;
rtems_status_code status;
/* Get device information from AMBA PnP information */
ambadev = (struct amba_dev_info *)pDev->dev->businfo;
@@ -555,21 +556,23 @@ int grspw_device_init(GRSPW_DEV *pDev)
return RTEMS_NO_MEMORY;
/* Create semaphores */
rtems_semaphore_create(
status = rtems_semaphore_create(
rtems_build_name('T', 'x', 'S', '0' + pDev->minor),
0,
RTEMS_FIFO | RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY | \
RTEMS_NO_PRIORITY_CEILING,
0,
&(pDev->txsp));
_Assert_Unused_variable_equals(status, RTEMS_SUCCESSFUL);
rtems_semaphore_create(
status = rtems_semaphore_create(
rtems_build_name('R', 'x', 'S', '0' + pDev->minor),
0,
RTEMS_FIFO | RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY | \
RTEMS_NO_PRIORITY_CEILING,
0,
&(pDev->rxsp));
_Assert_Unused_variable_equals(status, RTEMS_SUCCESSFUL);
grspw_hw_init(pDev);