lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 29 May 2023 09:25:15 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Matti Vaittinen <mazziesaccount@...il.com>,
	Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Daniel Scally <djrscally@...il.com>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Wolfram Sang <wsa@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Andreas Klinger <ak@...klinger.de>, Marcin Wojtas <mw@...ihalf.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Jonathan Neuschäfer <j.neuschaefer@....net>,
	Linus Walleij <linus.walleij@...aro.org>,
	Paul Cercueil <paul@...pouillou.net>,
	Akhil R <akhilrajeev@...dia.com>, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
	linux-iio@...r.kernel.org, netdev@...r.kernel.org,
	openbmc@...ts.ozlabs.org, linux-gpio@...r.kernel.org,
	linux-mips@...r.kernel.org
Subject: [PATCH v7 9/9] net-next: mvpp2: don't shadow error

Do not overwrite error from lower layers but return the actual error to
user if obtaining an IRQ fails.

Suggested-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Suggested-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
---
Revision history:
v7: New patch

 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 5b987af306a5..57cacdcd49ea 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -5830,13 +5830,13 @@ static int mvpp2_multi_queue_vectors_init(struct mvpp2_port *port,
 		}
 
 		if (port_node)
-			v->irq = of_irq_get_byname(port_node, irqname);
+			ret = of_irq_get_byname(port_node, irqname);
 		else
-			v->irq = fwnode_irq_get(port->fwnode, i);
-		if (v->irq < 0) {
-			ret = -EINVAL;
+			ret = fwnode_irq_get(port->fwnode, i);
+		if (ret < 0)
 			goto err;
-		}
+
+		v->irq = ret;
 
 		netif_napi_add(port->dev, &v->napi, mvpp2_poll);
 	}
-- 
2.40.1


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ