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]
Message-Id: <1290515373-16145-7-git-send-email-marek.belisko@open-nandra.com>
Date:	Tue, 23 Nov 2010 13:29:33 +0100
From:	Marek Belisko <marek.belisko@...n-nandra.com>
To:	Greg Kroah-Hartman <gregkh@...e.de>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Marek Belisko <marek.belisko@...n-nandra.com>
Subject: [PATCH 6/6] staging: ft1000: Check return value of ft1000_CreateDevice().

Registering of misc device could fail so add checking
of return value.

Signed-off-by: Marek Belisko <marek.belisko@...n-nandra.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 57a235f..fd1f071 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -948,9 +948,12 @@ int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
 	return rc;
     }
 
-
-    //Create character device, implemented by Jim
-    ft1000_CreateDevice(ft1000dev);
+	rc = ft1000_CreateDevice(ft1000dev);
+	if (rc) {
+		DEBUG("Could not register misc device :%d\n", rc);
+		free_netdev(netdev);
+		return rc;
+	}
 
     DEBUG ("reg_ft1000_netdev returned\n");
 
-- 
1.7.1

--
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