[openib-general] [PATCH][kdapl] remove NULL check for input params

Tom Duffy tduffy at sun.com
Wed Jun 22 08:25:59 PDT 2005


On Wed, 2005-06-22 at 17:36 +0300, Itamar Rabenstein wrote:
> diff -Nurp -X dontdiff dat-provider_del_hca/dapl_pz.c dat-provider/dapl_pz.c
> --- dat-provider_del_hca/dapl_pz.c	Mon Jun 20 08:40:28 2005
> +++ dat-provider/dapl_pz.c	Wed Jun 22 11:41:13 2005
> @@ -75,40 +75,23 @@ u32 dapl_pz_create(struct dat_ia *ia, st
>  	dapl_dbg_log(DAPL_DBG_TYPE_API, "dapl_pz_create(%p, %p)\n", 
>  		     ia, pz);
>  
> -	if (!ia) {
> -		status = DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
> -		goto error1;
> -	}
> -	if (NULL == pz) {
> -		status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
> -		goto error1;
> -	}
> -	
>  	dapl_ia = (struct dapl_ia *)ia;
>  
>  	dapl_pz = dapl_pz_alloc(dapl_ia);
> -	if (!dapl_pz) {
> -		status = 
> -		    DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
> -		goto error1;
> -	}
> -

This is an alloc check, should stay in.

-tduffy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050622/ef3ef463/attachment.sig>


More information about the general mailing list