Am Freitag, 16. April 2004 17:32 schrieb Alan Stern:
> +               cp->interface[i] = intf = kmalloc(sizeof(*intf),
> GFP_KERNEL); +               if (!intf) {
> +                       dev_err(&dev->dev, "Out of memory");
> +                       while (--i >= 0) {
> +                               put_device(&cp->interface[i]->dev);
> +                               cp->interface[i] = NULL;
> +                       }
> +                       dev->actconfig = NULL;
> +                       return -ENOMEM;
>                 }

Hi,

is that sufficient cleanup? I don't feel well about having a
half initialised device hanging around. Maybe the loop should
be devided and the memory allocated in the first run.

        Regards
                Oliver




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to