On Tue, Mar 05, 2013 at 12:02:51PM -0800, Tejun Heo wrote:
> idr_get_new*() and friends are about to be deprecated.  Convert to the
> new idr_alloc() interface.
> 
> There are some peculiarities and possible bugs in the converted
> functions.  This patch preserves those.
> 
> * drv_insert_node_res_element() returns -ENOMEM on alloc failure,
>   -EFAULT if id space is exhausted.  -EFAULT is at best misleading.
> 
> * drv_proc_insert_strm_res_element() is even weirder.  It returns
>   -EFAULT if kzalloc() fails, -ENOMEM if idr preloading fails and
>   -EPERM if id space is exhausted.  What's going on here?
> 
> * drv_proc_insert_strm_res_element() doesn't free *pstrm_res after
>   failure.
> 
> Only compile tested.
> 
> Signed-off-by: Tejun Heo <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Víctor Manuel Jáquez Leal <[email protected]>
> Cc: Rene Sapiens <[email protected]>
> Cc: Armando Uribe <[email protected]>
> Cc: Omar Ramirez Luna <[email protected]>
> ---
>  drivers/staging/tidspbridge/rmgr/drv.c | 70 
> +++++++++++++---------------------
>  1 file changed, 26 insertions(+), 44 deletions(-)

Acked-by: Greg Kroah-Hartman <[email protected]>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to