summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2007-04-01 16:55:31 +0000
committernetchild <netchild@FreeBSD.org>2007-04-01 16:55:31 +0000
commit52db950ba90dbd3afee7d1329b87280e2b161adb (patch)
treed5910ca928a71bd09976126bd9359546a54e02bd /sys
parent302dbc9a0e34d1331a75eec7b05fa0519d6281b3 (diff)
downloadFreeBSD-src-52db950ba90dbd3afee7d1329b87280e2b161adb.zip
FreeBSD-src-52db950ba90dbd3afee7d1329b87280e2b161adb.tar.gz
Handle errors from bus_setup_intr().
Found by: Coverity Prevent (tm) CID: 1066
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ahb/ahb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c
index 051688b..8887c80 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:
OpenPOWER on IntegriCloud