Pull request #111: am64x/am243x: SDFM: Remove duplicate checks

Merge in PINDSW/motor_control_sdk from a0502729_sdfm_resolve_klocwork_error to next

* commit '2a25701324fbb2910bf437cab07b78b385270399':
  am64x/am243x: SDFM: Remove duplicate checks
This commit is contained in:
Achala Ram 2024-01-05 07:06:07 -06:00 committed by Dhaval Khandla
commit 499533bc08

View File

@ -73,7 +73,7 @@ sdfm_handle SDFM_init(uint8_t pru_id, uint8_t coreId)
}
else
{
p_sdfm->p_sdfm_interface = NULL;
return NULL;
}
/* Set FW PRU ID */
@ -99,14 +99,14 @@ sdfm_handle SDFM_init(uint8_t pru_id, uint8_t coreId)
}
else
{
p_sdfm->p_sdfm_interface = NULL;
return NULL;
}
/* Set FW PRU ID */
p_sdfm->p_sdfm_interface->sdfm_ctrl.sdfm_pru_id = pru_id;
}
else
{
p_sdfm = NULL;
return NULL;
}
return (sdfm_handle)p_sdfm;
@ -288,7 +288,7 @@ int32_t SDFM_getFastDetectErrorStatus(sdfm_handle h_sdfm, uint8_t chNum)
uint8_t pwmSet;
int32_t retVal = SystemP_SUCCESS;
PRUICSS_Handle pruIcssHandle = h_sdfm->gPruIcssHandle;
if((chNum >= SDFM_CHANNEL0) && (chNum < SDFM_CHANNEL3))
if(chNum < SDFM_CHANNEL3)
{
pwmSet = 0;
}
@ -346,7 +346,7 @@ int32_t SDFM_clearPwmTripStatus(sdfm_handle h_sdfm, uint8_t chNum)
int32_t retVal = SystemP_SUCCESS;
PRUICSS_Handle pruIcssHandle = h_sdfm->gPruIcssHandle;
if((chNum >= SDFM_CHANNEL0) && (chNum < SDFM_CHANNEL3))
if(chNum < SDFM_CHANNEL3)
{
pwmSet = 0;
}
@ -479,7 +479,7 @@ int32_t SDFM_clearOverCurrentError(sdfm_handle h_sdfm, uint8_t chNum)
uint8_t pwmSet;
int32_t retVal = SystemP_SUCCESS;
PRUICSS_Handle pruIcssHandle = h_sdfm->gPruIcssHandle;
if((chNum >= SDFM_CHANNEL0) && (chNum < SDFM_CHANNEL3))
if(chNum < SDFM_CHANNEL3)
{
pwmSet = 0;
}