[PATCH: usbatm_15_05_05] usbatm_usb_probe() bugfix.
Duncan Sands
baldrick at free.fr
Fri May 27 11:26:48 EDT 2005
On Fri, 2005-05-27 at 16:51 +0200, Stanislaw W. Gruszka wrote:
> Hi Duncan,
>
> It seems that Your modified patch have a new bug :(
> If allocation:
>
> buffer = kmalloc(channel->buf_size, GFP_KERNEL);
>
> fail, then the urb->transfer_buffer will not be initialized,
> but the code:
>
> fail_free:
> for (i = 0; i < num_rcv_urbs + num_snd_urbs; i++) {
> if (instance->urbs[i])
> kfree(instance->urbs[i]->transfer_buffer);
> usb_free_urb(instance->urbs[i]);
> }
>
> will try to free it.
Hi Staszek Gruszka, it is initialized to NULL by usb_alloc_urb;
calling kfree (NULL) is fine, it doesn't do anything.
Ciao,
Duncan.
More information about the Usbatm
mailing list