Re: [PATCH 1/1] xen: set error code on failures

2016-12-04 Thread Juergen Gross
On 04/12/16 07:24, Pan Bian wrote: > From: Pan Bian > > The return variable rc is initialized with "-ENOMEM" outside the loop. > However, it is reset in the loop, and its value is not negative during > the second or after repeat of the loop. If kzalloc() fails then, it will

Re: [PATCH 1/1] xen: set error code on failures

2016-12-04 Thread Juergen Gross
On 04/12/16 07:24, Pan Bian wrote: > From: Pan Bian > > The return variable rc is initialized with "-ENOMEM" outside the loop. > However, it is reset in the loop, and its value is not negative during > the second or after repeat of the loop. If kzalloc() fails then, it will > return 0. This

[PATCH 1/1] xen: set error code on failures

2016-12-03 Thread Pan Bian
From: Pan Bian The return variable rc is initialized with "-ENOMEM" outside the loop. However, it is reset in the loop, and its value is not negative during the second or after repeat of the loop. If kzalloc() fails then, it will return 0. This patch fixes the bug,

[PATCH 1/1] xen: set error code on failures

2016-12-03 Thread Pan Bian
From: Pan Bian The return variable rc is initialized with "-ENOMEM" outside the loop. However, it is reset in the loop, and its value is not negative during the second or after repeat of the loop. If kzalloc() fails then, it will return 0. This patch fixes the bug, assigning "-ENOMEM" to rc