Author: kevlo
Date: Tue Mar  3 02:08:17 2015
New Revision: 279557
URL: https://svnweb.freebsd.org/changeset/base/279557

Log:
  Check the return value of config_intrhook_establish().

Modified:
  head/sys/dev/flash/at45d.c

Modified: head/sys/dev/flash/at45d.c
==============================================================================
--- head/sys/dev/flash/at45d.c  Mon Mar  2 23:17:17 2015        (r279556)
+++ head/sys/dev/flash/at45d.c  Tue Mar  3 02:08:17 2015        (r279557)
@@ -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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to