Author: mw
Date: Thu May 30 13:20:42 2019
New Revision: 348396
URL: https://svnweb.freebsd.org/changeset/base/348396

Log:
  Set error value when allocation of IO irq fails in ENA
  
  bus_alloc_resource_any() is not returning error value in case of an
  error.
  If the function call fails, the error value was not passed to the
  ena_up() function.
  
  Submitted by:  Michal Krawczyk <m...@semihalf.com>
  Obtained from: Semihalf
  Sponsored by:  Amazon, Inc.

Modified:
  head/sys/dev/ena/ena.c

Modified: head/sys/dev/ena/ena.c
==============================================================================
--- head/sys/dev/ena/ena.c      Thu May 30 13:19:32 2019        (r348395)
+++ head/sys/dev/ena/ena.c      Thu May 30 13:20:42 2019        (r348396)
@@ -1998,6 +1998,7 @@ ena_request_io_irq(struct ena_adapter *adapter)
                irq->res = bus_alloc_resource_any(adapter->pdev, SYS_RES_IRQ,
                    &irq->vector, flags);
                if (unlikely(irq->res == NULL)) {
+                       rc = ENOMEM;
                        device_printf(adapter->pdev, "could not allocate "
                            "irq vector: %d\n", irq->vector);
                        goto err;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to