From 988fa8d07826cb2f011b703ed7667e899ce7894c Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 5 May 2016 19:30:14 +0000 Subject: [PATCH] [bhnd] handle unknown port type. Reported by: emaste --- sys/dev/bhnd/bcma/bcma.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/bhnd/bcma/bcma.c b/sys/dev/bhnd/bcma/bcma.c index f1387e74705..987eee2b239 100644 --- a/sys/dev/bhnd/bcma/bcma.c +++ b/sys/dev/bhnd/bcma/bcma.c @@ -251,6 +251,11 @@ bcma_get_port_count(device_t dev, device_t child, bhnd_port_type type) 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); } }