Author: adrian
Date: Thu May  5 19:30:14 2016
New Revision: 299129
URL: https://svnweb.freebsd.org/changeset/base/299129

Log:
  [bhnd] handle unknown port type.
  
  Reported by: emaste

Modified:
  head/sys/dev/bhnd/bcma/bcma.c

Modified: head/sys/dev/bhnd/bcma/bcma.c
==============================================================================
--- head/sys/dev/bhnd/bcma/bcma.c       Thu May  5 18:59:29 2016        
(r299128)
+++ head/sys/dev/bhnd/bcma/bcma.c       Thu May  5 19:30:14 2016        
(r299129)
@@ -251,6 +251,11 @@ bcma_get_port_count(device_t dev, device
                return (dinfo->corecfg->num_bridge_ports);
        case BHND_PORT_AGENT:
                return (dinfo->corecfg->num_wrapper_ports);
+       default:
+               device_printf(dev, "%s: unknown type (%d)\n",
+                   __func__,
+                   type);
+               return (0);
        }
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to