Re: [PATCH] bluetooth: kill redundant NULL checks and casts beforekfree

From: Marcel Holtmann
Date: Wed May 11 2005 - 05:56:51 EST


Hi Jesper,

> > > There's no need to check for NULL before calling kfree() on a pointer, and
> > > since kfree() takes a void* argument there's no need to cast pointers to
> > > other types before passing them to kfree().
> >
> > > + kfree(hdev->driver_data)
> >
> > This won't compile.
> >
> Ouch. You are right.
> I usually compile test patches, but I have to admit I didn't this time.
> Sorry about that. Fixed patch below.

the hci_vhci.c change is not needed, because I have a pending update for
that driver that already fixes this. The other two hunks are in my tree
now.

Regards

Marcel


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