Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2019 13:20:43 +0000 (UTC)
From:      Marcin Wojtas <mw@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348396 - head/sys/dev/ena
Message-ID:  <201905301320.x4UDKhmj061448@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <mk@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905301320.x4UDKhmj061448>