USB: io_ti: fix sysfs-attribute creation
authorJohan Hovold <jhovold@gmail.com>
Thu, 18 Oct 2012 09:43:28 +0000 (11:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:11 +0000 (10:56 -0700)
commit2a73dc8b5746d4caf3d8624d5f6e20ce54351a9c
treecfd12e9baa6aa8c91eab29376e62c5d3b00e8215
parent6547e27d6b60717040b105bafb5a4f4d5d5c0f79
USB: io_ti: fix sysfs-attribute creation

commit 5d8c61bc283826827e1f06816c146bfc507d3834 upstream.

Make sure port data is initialised before creating sysfs attributes to
avoid a race.

A recent patch ("USB: io_ti: fix port-data memory leak") got the
sysfs-attribute creation and port-data initialisation ordering wrong.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/io_ti.c