[PATCH] check comport existence for udbg

Mattias Engdegård mattias at virtutech.se
Wed Jun 25 02:06:16 EST 2003


[ description of a bug, and a broken patch ]

I forgot a case here. Sorry. Here is a fixed patch.

--- chrp_setup.c~       Tue Jun 17 17:43:50 2003
+++ chrp_setup.c        Tue Jun 24 18:03:49 2003
@@ -207,7 +207,11 @@
 #endif

        /* Map the uart for udbg. */
-       comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE);
+       if (naca->serialPortAddr)
+               comport = (void *)__ioremap(naca->serialPortAddr, 16,
+                                           _PAGE_NO_CACHE);
+       else
+               comport = NULL;
        udbg_init_uart(comport);

        ppc_md.udbg_putc = udbg_putc;

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list