From 02da6fa1900e70497e825966cd8b63e9406c099e Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sun, 1 Apr 2007 16:55:31 +0000 Subject: [PATCH] Handle errors from bus_setup_intr(). Found by: Coverity Prevent (tm) CID: 1066 --- sys/dev/ahb/ahb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index 051688b4900..8887c80b11e 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -378,8 +378,10 @@ ahbattach(device_t dev) goto error_exit; /* Enable our interrupt */ - bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL, ahbintr, - ahb, &ih); + if (bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL, ahbintr, + ahb, &ih) != 0) + goto error_exit; + return (0); error_exit: