[openib-general] [PATCH][kdapl] remove NULL check for input p arams
Itamar Rabenstein
itamar at mellanox.co.il
Wed Jun 22 11:02:51 PDT 2005
Good catch (;-)
James , can you fix it when you apply the patch.
(I can not generate a new patch now , I am not at work)
Itamar
> -----Original Message-----
> From: Tom Duffy [mailto:tduffy at sun.com]
> Sent: Wednesday, June 22, 2005 6:26 PM
> To: Itamar Rabenstein
> Cc: James.Lentini at netapp.com; openib-general at openib.org
> Subject: Re: [openib-general] [PATCH][kdapl] remove NULL
> check for input
> params
>
>
> 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
>
More information about the general
mailing list