aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/inventory.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/inventory.c')
-rw-r--r--arch/parisc/kernel/inventory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c
index 08324aac354..3295ef4a185 100644
--- a/arch/parisc/kernel/inventory.c
+++ b/arch/parisc/kernel/inventory.c
@@ -186,12 +186,14 @@ pat_query_module(ulong pcell_loc, ulong mod_index)
if (status != PDC_OK) {
/* no more cell modules or error */
+ kfree(pa_pdc_cell);
return status;
}
temp = pa_pdc_cell->cba;
dev = alloc_pa_dev(PAT_GET_CBA(temp), &(pa_pdc_cell->mod_path));
if (!dev) {
+ kfree(pa_pdc_cell);
return PDC_OK;
}