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-next>] [day] [month] [year] [list]
Message-ID: <20061127050915.GH1231@APFDCB5C>
Date:	Mon, 27 Nov 2006 14:09:15 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	David Brownell <dbrownell@...rs.sourceforge.net>
Subject: [PATCH] spi: check platform_device_register_simple() error

This patch checks the return value of platform_device_register_simple().

Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>

---
 drivers/spi/spi_butterfly.c |    2 ++
 1 file changed, 2 insertions(+)

Index: work-fault-inject/drivers/spi/spi_butterfly.c
===================================================================
--- work-fault-inject.orig/drivers/spi/spi_butterfly.c
+++ work-fault-inject/drivers/spi/spi_butterfly.c
@@ -250,6 +250,8 @@ static void butterfly_attach(struct parp
 	 * setting up a platform device like this is an ugly kluge...
 	 */
 	pdev = platform_device_register_simple("butterfly", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return;
 
 	master = spi_alloc_master(&pdev->dev, sizeof *pp);
 	if (!master) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ