Re: [PATCH 1/1] infiniband: hw: cxgb4: set errno on failure

2016-12-14 Thread Doug Ledford
On 12/3/2016 8:04 AM, Pan Bian wrote: > From: Pan Bian > > In function c4iw_rdev_open(), the value of return variable err should be > negative on errors. However, when the call to __get_free_page() returns > a NULL pointer, its value is not set to "-ENOMEM" and keeps 0. 0 means > no error. And th

RE: [PATCH 1/1] infiniband: hw: cxgb4: set errno on failure

2016-12-03 Thread Steve Wise
Acked-by: Steve Wise

[PATCH 1/1] infiniband: hw: cxgb4: set errno on failure

2016-12-03 Thread Pan Bian
From: Pan Bian In function c4iw_rdev_open(), the value of return variable err should be negative on errors. However, when the call to __get_free_page() returns a NULL pointer, its value is not set to "-ENOMEM" and keeps 0. 0 means no error. And thus, the behavior of its caller may be misled. This