[Skiboot] [PATCH v2 06/12] hdat: add_iplparams_serial - Validate HDIF_get_iarray_size() return value
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Dec 20 17:09:55 AEDT 2016
Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> ---
> hdata/spira.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hdata/spira.c b/hdata/spira.c
> index 9481bb6..2066426 100644
> --- a/hdata/spira.c
> +++ b/hdata/spira.c
> @@ -884,7 +884,7 @@ static void add_iplparams_serials(const void *iplp, struct dt_node *node)
> int count, i;
>
> count = HDIF_get_iarray_size(iplp, IPLPARMS_IDATA_SERIAL);
> - if (!count) {
> + if (count <= 0) {
> prerror("IPLPARAMS: No serial ports\n");
> return;
> }
looks good, merged to master as of 6e0ec58
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list