USB: ark3116: fix NULL-pointer dereference
authorJohan Hovold <jhovold@gmail.com>
Mon, 15 Oct 2012 16:20:52 +0000 (18:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:12 +0000 (10:56 -0700)
commitbb5c0c637f4f2dc8ed38f580881c40977980f031
tree5621504f350349f0eee9d7667bd14436330adc86
parente1d21d7119c98059424137340f8c3a405ee5ef3d
USB: ark3116: fix NULL-pointer dereference

commit 7bdce71822f471433dd3014692e9096996c7b5f0 upstream.

Fix NULL-pointer dereference at release by replacing attach and release
with port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is NULL when release is called.

Compile-only tested.

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