On 10/15/2018 07:39 PM, Michael Ellerman wrote:
> Michael Bringmann <m...@linux.vnet.ibm.com> writes:
>> diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c 
>> b/arch/powerpc/platforms/pseries/hotplug-memory.c
>> index 2b796da..9c76345 100644
>> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c
>> +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
>> @@ -541,6 +549,23 @@ static int dlpar_memory_readd_by_index(u32 drc_index)
>>      return rc;
>>  }
>>
>> +static int dlpar_memory_readd_multiple(void)
>> +{
>> +    struct drmem_lmb *lmb;
>> +    int rc;
>> +
>> +    pr_info("Attempting to update multiple LMBs\n");
>> +
>> +    for_each_drmem_lmb(lmb) {
>> +            if (drmem_lmb_update(lmb)) {
>> +                    rc = dlpar_memory_readd_helper(lmb);
>> +                    drmem_remove_lmb_update(lmb);
>> +            }
>> +    }
>> +
>> +    return rc;
>> +}
> 
> This leaves rc potentially uninitialised.
> 
> What should the result be in that case, -EINVAL ?

I will force it to be zero (0).  Failure to find anything
to update is not an error.

> 
> cheers

Thanks.

-- 
Michael W. Bringmann
Linux Technology Center
IBM Corporation
Tie-Line  363-5196
External: (512) 286-5196
Cell:       (512) 466-0650
m...@linux.vnet.ibm.com

Reply via email to