[PATCH 1/1] net: bnx2x: fix improper return value

2016-12-04 Thread Pan Bian
From: Pan Bian Macro BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling the macro, the value of variable rc is 0. Because 0

[PATCH 1/1] net: bnx2x: fix improper return value

2016-12-04 Thread Pan Bian
From: Pan Bian Macro BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling the macro, the value of variable rc is 0. Because 0 means no error, the

Re: [PATCH 1/1] net: bnx2x: fix improper return value

2016-12-04 Thread Sergei Shtylyov
On 12/4/2016 11:39 AM, Pan Bian wrote: From: Pan Bian Marco BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate Macro. memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling

Re: [PATCH 1/1] net: bnx2x: fix improper return value

2016-12-04 Thread Sergei Shtylyov
On 12/4/2016 11:39 AM, Pan Bian wrote: From: Pan Bian Marco BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate Macro. memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling the macro, the value

[PATCH 1/1] net: bnx2x: fix improper return value

2016-12-04 Thread Pan Bian
From: Pan Bian Marco BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling the macro, the value of variable rc is 0. Because 0

[PATCH 1/1] net: bnx2x: fix improper return value

2016-12-04 Thread Pan Bian
From: Pan Bian Marco BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate memory, and jumps to label "lbl" if the allocation fails. Label "lbl" first cleans memory and then returns variable rc. Before calling the macro, the value of variable rc is 0. Because 0 means no error, the