From: Johan Hovold Date: Thu, 25 Oct 2012 16:56:34 +0000 (+0200) Subject: USB: mos7840: fix port-data memory leak X-Git-Tag: v3.7-rc3~11^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80c00750f0c9867a65b30a17880939b6bc660a77;p=pandora-kernel.git USB: mos7840: fix port-data memory leak Fix port-data memory leak by moving port data allocation and deallocation to port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the indentation was kept intact using a do-while(0) in order to facilitate review. A follow-up patch will remove it. Compile-only tested. Signed-off-by: Johan Hovold Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed