On 11/18/2016 04:36 AM, Mauricio Faria de Oliveira wrote:
> Dont return early in opal_get_indicator_list() in case any of
> the get_indices() call happens to fail. Let's go through all
> the calls to ensure any other pending/possible indicator that
> can work still goes into the list.
>
> Signed-off-by: Mauricio Faria de Oliveira <mau...@li...>
> ---
> lpd/indicator_opal.c | 24 ++++++++----------------
> 1 file changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/lpd/indicator_opal.c b/lpd/indicator_opal.c
> index 712f57fea4e4..8a2003dc6696 100644
> --- a/lpd/indicator_opal.c
> +++ b/lpd/indicator_opal.c
> @@ -423,27 +423,15 @@ opal_get_indicator_mode(void)
> static int
> opal_get_indicator_list(int indicator, struct loc_code **list)
> {
> - int rc;
> -
> /*
> * We treat first indicator in fault indicator list as
> * check log indicator. Hence parse attention indicator.
> */
> - if (indicator == LED_TYPE_FAULT) {
> - rc = opal_get_indices(LED_TYPE_ATTN, list);
> - if (rc)
> - return rc;
> - }
> + if (indicator == LED_TYPE_FAULT)
> + opal_get_indices(LED_TYPE_ATTN, list);
>
> /* Get OPAL indicator list */
> - rc = opal_get_indices(indicator, list);
> - if (rc)
> - return rc;
> -
> - /* FRU fault indicators are not supported in Guiding Light mode */
> - if (indicator == LED_TYPE_FAULT &&
> - operating_mode == LED_MODE_GUIDING_LIGHT)
> - return rc;
I've retained above check and merged as 53f12274.
-Vasant
|