* Pekka Enberg <penberg@xxxxxxxxxxxxxx>: > On Sat, Oct 4, 2008 at 2:18 AM, Alex Chiang <achiang@xxxxxx> wrote: > > @@ -63,10 +63,9 @@ struct slot *alloc_slot_struct(struct device_node *dn, > > GFP_KERNEL); > > if (!slot->hotplug_slot->info) > > goto error_hpslot; > > - slot->hotplug_slot->name = kmalloc(strlen(drc_name) + 1, GFP_KERNEL); > > - if (!slot->hotplug_slot->name) > > + slot->name = kmalloc(strlen(drc_name) + 1, GFP_KERNEL); > > + if (!slot->name) > > goto error_info; > > - slot->name = slot->hotplug_slot->name; > > strcpy(slot->name, drc_name); > > Minor nit: you could use kstrdup() here. Good call, I've made a change, thanks. /ac -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html