> The function idr_pre_get may fail, so there is a need to check the status of
> it. Since this function allocate resources, we need to clean them during the
> resource cleaning in case of error.

We should add the cleanup code below, but I don't think we care if idr_pre_get 
fails here.  We'll just try again later.

> -error2:
> +error3:
>       destroy_workqueue(cm.wq);
> -error1:
> +error2:
>       class_unregister(&cm_class);
> +error1:
> +     idr_destroy(&cm.local_id_table);
>       return ret;
>  }
> 

- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to