From f08ac846058206761a9e4e4070394413660ffb07 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Sat, 22 Mar 2008 00:07:13 +0100 Subject: [PATCH] --- yaml --- r: 91693 b: refs/heads/master c: 029c3c133ba2c3e0e48fdfacc08324bb3fa2a571 h: refs/heads/master i: 91691: c6a4a6db087d8f4d83308360e6d70b3b40925754 v: v3 --- [refs] | 2 +- trunk/drivers/pci/hotplug/ibmphp_core.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0409ae2bae2e..9018f5afaa10 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 884525655d07fdee9245716b998ecdc45cdd8007 +refs/heads/master: 029c3c133ba2c3e0e48fdfacc08324bb3fa2a571 diff --git a/trunk/drivers/pci/hotplug/ibmphp_core.c b/trunk/drivers/pci/hotplug/ibmphp_core.c index 87b6b8b280e6..81d009229188 100644 --- a/trunk/drivers/pci/hotplug/ibmphp_core.c +++ b/trunk/drivers/pci/hotplug/ibmphp_core.c @@ -148,8 +148,10 @@ int ibmphp_init_devno(struct slot **cur_slot) len = (rtable->size - sizeof(struct irq_routing_table)) / sizeof(struct irq_info); - if (!len) + if (!len) { + kfree(rtable); return -1; + } for (loop = 0; loop < len; loop++) { if ((*cur_slot)->number == rtable->slots[loop].slot) { if ((*cur_slot)->bus == rtable->slots[loop].bus) { @@ -187,11 +189,13 @@ int ibmphp_init_devno(struct slot **cur_slot) debug("rtable->slots[loop].irq[3].link = %x\n", rtable->slots[loop].irq[3].link); debug("end of init_devno\n"); + kfree(rtable); return 0; } } } + kfree(rtable); return -1; }