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:	Sun, 25 Mar 2007 00:55:07 +0900 (JST)
From:	Noriaki TAKAMIYA <takamiya@...ux-ipv6.org>
To:	linux-usb-devel@...ts.sourceforge.net
Cc:	linux-kernel@...r.kernel.org, usagi-core@...ux-ipv6.org
Subject: [PATCH 2/2] [USB] [SERIAL]: fixed to skip NULL port entry in
 struct usb_serial_port.

Hi,

  This patch fixes to skip serial->port[i] if it is set NULL.
---
 include/linux/usb/serial.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 32acbae..85ed5ef 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -99,7 +99,10 @@ struct usb_serial_port {
 /* get and set the port private data pointer helper functions */
 static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
 {
-	return dev_get_drvdata(&port->dev);
+	if (port)
+		return dev_get_drvdata(&port->dev);
+	else
+		return NULL;
 }
 
 static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
-- 
1.4.4

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