[PATCH] another ioremap/iounmap issue in sycamore_setup_arch(); arch/ppc/platforms/4xx/sycamore.c

Josh Boyer jwboyer at linux.vnet.ibm.com
Fri Nov 9 01:08:01 EST 2007


On Wed, 07 Nov 2007 23:14:26 +0100
Roel Kluin <12o3l at tiscali.nl> wrote:

> not yet tested
> --
> iounmap kb_data on error
> 
> Signed-off-by: Roel Kluin <12o3l at tiscali.nl>
> ---
> diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c
> index 8689f3e..c4ac63d 100644
> --- a/arch/ppc/platforms/4xx/sycamore.c
> +++ b/arch/ppc/platforms/4xx/sycamore.c
> @@ -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;
>  	}

Same comment as the walnut patch.  You can probably fold these two
patches into one.

josh



More information about the Linuxppc-dev mailing list