[openib-general] Error code in "create" functions

Sean Hefty mshefty at ichips.intel.com
Tue Aug 17 13:23:25 PDT 2004


On Wed, 18 Aug 2004 00:19:34 +0300
Dror Goldenberg <gdror at mellanox.co.il> wrote:

> My concern is about the ability to return error status. The failure may be
> due
> to lack of resources, in which case, returning NULL makes sense. However,
> some may fail because of bad parameters being passed in. This is mainly
> because these functions not only deal with memory allocation of the object,
> they also deal with initialization of the object and configuration of the
> HW.

Based on previous discussions, I believe that the plan is to use the ERR_PTR / PTR_ERR / IS_ERR routines to return failure reasons.



More information about the general mailing list