Balanced io{re|un}map : drivers/char/moxa.c
Subsystems (2)
PATCH 1/1 Balanced io{re|un}map : drivers/char/moxa.c
description:
Balancing functions: io{re|un}map here.
Make sure calls to certain functions are matched by the relevant function at other end of the function, and also during ALL failure/early return paths.
drivers/char/moxa.c +4 -0
@@ -492,6 +492,10 @@ static void __exit moxa_exit(void)if (tty_unregister_driver (moxaDriver))printk ("Couldn't unregister MOXA Intellio family serial driver\n" );put_tty_driver (moxaDriver); +for (i =0 ; i < numBoards; i++) { +iounmap ((void __iomem *) moxaBaseAddr[i]); + } +if (verbose)printk ("Done\n" ); }
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
drivers/char/moxa.c static void __exit moxa_exit(void) · line 496
Quoted 11 lines · Christophe Lucas
Make sure calls to certain functions are matched by the relevant function at other end of the function, and also during ALL failure/early return paths.
drivers/char/moxa.c +4
-0@@ -492,6 +492,10 @@ static void __exit moxa_exit(void) +for (i =0 ; i < numBoards; i++) { +iounmap ((void __iomem *) moxaBaseAddr[i]); + } +
No need for cast and for {}.
static void __iomem *moxaBaseAddr[MAX_BOARDS];
Oh, and it won't compile.
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors