another ioremap/iounmap issue in sycamore_setup_arch(); arch/ppc/platforms/4xx/sycamore.c
PATCH 1/1 another ioremap/iounmap issue in sycamore_setup_arch(); arch/ppc/platforms/4xx/sycamore.c
not yet tested
--
iounmap kb_data on error
Signed-off-by Roel Kluin <[email protected]>
---
arch/ppc/platforms/4xx/sycamore.c +1 -0
@@ -99,22 +99,23 @@ sycamore_setup_arch(void) kb_data =ioremap (SYCAMORE_PS2_BASE ,8 );if (!kb_data) {printk (KERN_CRIT "sycamore_setup_arch() kb_data ioremap failed\n" );return ; } kb_cs = kb_data +1 ; fpga_status =ioremap (PPC40x_FPGA_BASE,8 );if (!fpga_status) { +iounmap (kb_data);printk (KERN_CRIT "sycamore_setup_arch() fpga_status ioremap failed\n" );return ; } fpga_enable = fpga_status +1 ; fpga_polarity = fpga_status +2 ; fpga_trigger = fpga_status +3 ; fpga_brdc = fpga_status +4 ;/* split the keyboard and mouse interrupts */
Quoted 17 lines · On Wed, 07 Nov 2007 23:14:26 +0100 Roel Kluin <[email protected]> wrote:
not yet tested
--
iounmapkb_dataon errorSigned-off-by Roel Kluin <[email protected]>---
arch/ppc/platforms/4xx/sycamore.c +0
-0@@ -99,22 +99,23 @@ sycamore_setup_arch(void) kb_data =ioremap (SYCAMORE_PS2_BASE ,8 );if (!kb_data) {printk (KERN_CRIT "sycamore_setup_arch() kb_data ioremap failed\n" );return ; }
arch/ppc/platforms/4xx/sycamore.c sycamore_setup_arch(void) · line 114
Quoted 10 lines
arch/ppc/platforms/4xx/sycamore.c +1
-0kb_cs = kb_data +1 ; fpga_status =ioremap (PPC40x_FPGA_BASE,8 );if (!fpga_status) { +iounmap (kb_data);printk (KERN_CRIT "sycamore_setup_arch() fpga_status ioremap failed\n" );return ; }
Same comment as the walnut patch. You can probably fold these two patches into one.
josh