Skip to content

Commit 55a3f2f

Browse files
committed
Fix RTM disable payload power error check
Commit 331bb6f replaced the rtm_quiesce() function with rtm_disable_payload_power(), but the last returns the mmc_err enum type, so it should be compared with the enum values. MMC_OK is the first value defined in the mmc_err enum type, so it was represented numerically as 0, and would evaluate as false in the if statement.
1 parent a508f3b commit 55a3f2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/rtm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "event_groups.h"
2525

2626
/* Project includes */
27+
#include "mmc_error.h"
2728
#include "port.h"
2829
#include "rtm.h"
2930
#include "rtm_user.h"
@@ -127,7 +128,7 @@ void RTM_Manage( void * Parameters )
127128
current_evt = xEventGroupGetBits( rtm_payload_evt );
128129

129130
if ( current_evt & PAYLOAD_MESSAGE_QUIESCE ) {
130-
if ( rtm_disable_payload_power() ) {
131+
if (rtm_disable_payload_power() == MMC_OK) {
131132
/* Quiesced event */
132133
printf("[RTM] Quiesced RTM successfuly!\n");
133134
hotswap_set_mask_bit( HOTSWAP_RTM, HOTSWAP_QUIESCED_MASK );

0 commit comments

Comments
 (0)