[PATCH] USB: Allow NULL argument in usb_unlink_urb() and usb_kill_urb()
It makes sense for APIs involved in cleanup activities (like kfree()) to accept NULL arguments. Doing so frees drivers from the responsibility of checking whether each resource was actually acquired before trying to release it. Accordingly, this patch makes usb_unlink_urb() and usb_kill_urb() accept a NULL pointer (which used to be acceptable until I changed it) and notes explicitly in the kerneldoc that such arguments are permitted. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment