From aeb0c6939be13712f8d59edbd23733dccdf7fcf6 Mon Sep 17 00:00:00 2001 From: kevlo Date: Tue, 3 Mar 2015 02:08:17 +0000 Subject: Check the return value of config_intrhook_establish(). --- sys/dev/flash/at45d.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/flash/at45d.c b/sys/dev/flash/at45d.c index 7506434..347ed90 100644 --- a/sys/dev/flash/at45d.c +++ b/sys/dev/flash/at45d.c @@ -197,8 +197,10 @@ at45d_attach(device_t dev) /* We'll see what kind of flash we have later... */ sc->config_intrhook.ich_func = at45d_delayed_attach; sc->config_intrhook.ich_arg = sc; - if (config_intrhook_establish(&sc->config_intrhook) != 0) + if (config_intrhook_establish(&sc->config_intrhook) != 0) { device_printf(dev, "config_intrhook_establish failed\n"); + return (ENOMEM); + } return (0); } -- cgit v1.1