summaryrefslogtreecommitdiffstats
path: root/sys/arm/ti
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm/ti')
-rw-r--r--sys/arm/ti/aintc.c7
-rw-r--r--sys/arm/ti/omap4/omap4_wugen.c2
-rw-r--r--sys/arm/ti/ti_gpio.c7
3 files changed, 10 insertions, 6 deletions
diff --git a/sys/arm/ti/aintc.c b/sys/arm/ti/aintc.c
index 5fb4695..ae5bad6 100644
--- a/sys/arm/ti/aintc.c
+++ b/sys/arm/ti/aintc.c
@@ -220,6 +220,7 @@ ti_aintc_post_filter(device_t dev, struct intr_irqsrc *isrc)
static int
ti_aintc_pic_attach(struct ti_aintc_softc *sc)
{
+ struct intr_pic *pic;
int error;
uint32_t irq;
const char *name;
@@ -236,9 +237,9 @@ ti_aintc_pic_attach(struct ti_aintc_softc *sc)
}
xref = OF_xref_from_node(ofw_bus_get_node(sc->sc_dev));
- error = intr_pic_register(sc->sc_dev, xref);
- if (error != 0)
- return (error);
+ pic = intr_pic_register(sc->sc_dev, xref);
+ if (pic == NULL)
+ return (ENXIO);
return (intr_pic_claim_root(sc->sc_dev, xref, ti_aintc_intr, sc, 0));
}
diff --git a/sys/arm/ti/omap4/omap4_wugen.c b/sys/arm/ti/omap4/omap4_wugen.c
index f2bed61..8909126 100644
--- a/sys/arm/ti/omap4/omap4_wugen.c
+++ b/sys/arm/ti/omap4/omap4_wugen.c
@@ -210,7 +210,7 @@ omap4_wugen_attach(device_t dev)
return (ENXIO);
}
- if (intr_pic_register(dev, OF_xref_from_node(node)) != 0) {
+ if (intr_pic_register(dev, OF_xref_from_node(node)) == NULL) {
device_printf(dev, "can't register PIC\n");
goto fail;
}
diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c
index a67884e..583a65a 100644
--- a/sys/arm/ti/ti_gpio.c
+++ b/sys/arm/ti/ti_gpio.c
@@ -904,8 +904,11 @@ ti_gpio_pic_attach(struct ti_gpio_softc *sc)
if (error != 0)
return (error); /* XXX deregister ISRCs */
}
- return (intr_pic_register(sc->sc_dev,
- OF_xref_from_node(ofw_bus_get_node(sc->sc_dev))));
+ if (intr_pic_register(sc->sc_dev,
+ OF_xref_from_node(ofw_bus_get_node(sc->sc_dev))) == NULL)
+ return (ENXIO);
+
+ return (0);
}
static int
OpenPOWER on IntegriCloud