On Wed, 07 Nov 2007 23:17:30 +0100
Roel Kluin <[EMAIL PROTECTED]> wrote:

> iounmap kb_data on error
> 
> Signed-off-by: Roel Kluin <[EMAIL PROTECTED]>
> ---
> diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c
> index 2f97723..04d3f3f 100644
> --- a/arch/ppc/platforms/4xx/walnut.c
> +++ b/arch/ppc/platforms/4xx/walnut.c
> @@ -81,22 +81,23 @@ walnut_setup_arch(void)
>       kb_data = ioremap(WALNUT_PS2_BASE, 8);
>       if (!kb_data) {
>               printk(KERN_CRIT
>                      "walnut_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
>                      "walnut_setup_arch() fpga_status ioremap failed\n");
>               return;
>       }

kb_data and fpga_status aren't iounmapped anywhere at all in this
function.  Care to fix that up in addition to the error case?

> 
>       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 */
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to