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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240807141227.1093006-4-msp@baylibre.com>
Date: Wed,  7 Aug 2024 16:12:25 +0200
From: Markus Schneider-Pargmann <msp@...libre.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Markus Schneider-Pargmann <msp@...libre.com>,
	Tony Lindgren <tony@...mide.com>,
	Vignesh Raghavendra <vigneshr@...com>,
	Ronald Wahl <ronald.wahl@...itan.com>,
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
	Thomas Richard <thomas.richard@...tlin.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Udit Kumar <u-kumar1@...com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Vibhore Vardhan <vibhore@...com>,
	Kevin Hilman <khilman@...libre.com>,
	Dhruva Gole <d-gole@...com>,
	linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: [PATCH v2 3/5] serial: 8250: omap: Cleanup on error in request_irq

If devm_request_irq fails, the code does not cleanup many things that
were setup before. Instead of directly returning ret we should jump to
err.

Fixes: fef4f600319e ("serial: 8250: omap: Fix life cycle issues for interrupt handlers")
Signed-off-by: Markus Schneider-Pargmann <msp@...libre.com>
---
 drivers/tty/serial/8250/8250_omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 02d4f3073696..01d430de9c64 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1587,7 +1587,7 @@ static int omap8250_probe(struct platform_device *pdev)
 	ret = devm_request_irq(&pdev->dev, up.port.irq, omap8250_irq, 0,
 			       dev_name(&pdev->dev), priv);
 	if (ret < 0)
-		return ret;
+		goto err;
 
 	priv->wakeirq = irq_of_parse_and_map(np, 1);
 
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ