USB: sierra: fix memory leak in probe error path
authorJohan Hovold <jhovold@gmail.com>
Thu, 25 Oct 2012 08:29:18 +0000 (10:29 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:27:02 +0000 (23:27 +0000)
commit87df704c0761f76644e3b4cc689805cfe60f874c
tree38c5062a77dacb72dded6fcf8eafefc4a38420d1
parent05d84306250bff450f5f4b9da3f46125ba46c9d1
USB: sierra: fix memory leak in probe error path

commit 084817d79399ab5ccab2f90a148b0369912a8369 upstream.

Move interface data allocation to attach so that it is deallocated on
errors in usb-serial probe.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/sierra.c