lkml.org 
[lkml]   [2003]   [May]   [7]   [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 U SB.
Date

> From: Greg KH [mailto:greg@kroah.com]
>
> > If usb_init_urb() is already testing for !urb, why
> > test it again? No doubt the compiler will probably
> > catch it if inlining ... but I think the best is
> > for usb_init_urb() to assume that urb is not NULL.
> > Let the caller make that sure.
>
> Because people other than usb_alloc_urb() can call usb_init_urb().
> Yeah, I can remove the check, then any invalid caller will oops on the

Just documenting it should do :]

> first line of usb_init_urb(). I don't mind, was just trying to program
> a bit more defensibly. You know, make it a "hardened driver" :)

Stab right in the heart :] I think we all agree we prefer "hardened
coders".

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
-
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.028 / U:1.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site