ehci-hcd: fix memory leak in lowlevel init
authorNikita Kiryanov <nikita@compulab.co.il>
Mon, 29 Jul 2013 10:27:40 +0000 (13:27 +0300)
committerMarek Vasut <marex@denx.de>
Mon, 29 Jul 2013 21:01:33 +0000 (23:01 +0200)
commit8bc3603675f7bf4dfa4eb6bdaf2aa0a8ddce9fa6
treea8817e9929b6d29ab2b0f2d5eabf8b10198b5336
parent0adc331b37b71093a047607faf1ed1b60e572017
ehci-hcd: fix memory leak in lowlevel init

usb_lowlevel_init() allocates a new periodic_list each time it is invoked,
without freeing the original list. Since it is initialized later on in the code,
just reuse the first-allocated list in future invocations of usb_lowlevel_init.

Cc: Marek Vasut <marex@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
drivers/usb/host/ehci-hcd.c