Author: nyan
Date: Sat Jun 27 09:01:49 2015
New Revision: 284886
URL: https://svnweb.freebsd.org/changeset/base/284886

Log:
  MFi386: r278165
  
    Silence a coverity warning about ignoring a return value.

Modified:
  head/sys/dev/fe/if_fe_cbus.c

Modified: head/sys/dev/fe/if_fe_cbus.c
==============================================================================
--- head/sys/dev/fe/if_fe_cbus.c        Sat Jun 27 08:49:41 2015        
(r284885)
+++ head/sys/dev/fe/if_fe_cbus.c        Sat Jun 27 09:01:49 2015        
(r284886)
@@ -157,10 +157,21 @@ static int
 fe_isa_attach(device_t dev)
 {
        struct fe_softc *sc = device_get_softc(dev);
+       int error = 0;
 
-       if (sc->port_used)
-               fe98_alloc_port(dev, sc->type);
-       fe_alloc_irq(dev, 0);
+       /*
+        * Note: these routines aren't expected to fail since we also call
+        * them in the probe routine.  But coverity complains, so we'll honor
+        * that complaint since the intention here was never to ignore them..
+        */
+       if (sc->port_used) {
+               error = fe98_alloc_port(dev, sc->type);
+               if (error != 0)
+                       return (error);
+       }
+       error = fe_alloc_irq(dev, 0);
+       if (error != 0)
+               return (error);
 
        return fe_attach(dev);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to