lkml.org 
[lkml]   [2003]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Bluetooth] HCI USB driver update. Support for SCO over HCI USB.
Date

> +int usb_init_urb(struct urb *urb)
> +{
> + if (!urb)
> + return -EINVAL;
> + memset(urb, 0, sizeof(*urb));
> + urb->count = (atomic_t)ATOMIC_INIT(1);
> + spin_lock_init(&urb->lock);
> +
> + return 0;
> +}

Greg, please don't do it this way. Somebody will
try to free this urb. If the urb is part of a structure
this must not lead to a kfree. Please init it to some
insanely high dummy value in this case.

Regards
Oliver

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

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.098 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site