Re: [Xen-devel] [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 pat

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

2016-12-04 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 whe