From: Johan Hovold Date: Thu, 25 Oct 2012 08:29:15 +0000 (+0200) Subject: USB: keyspan: fix NULL-pointer dereferences and memory leaks X-Git-Tag: v3.7-rc3~11^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f79b2d0fe81eecb412dc48e87a119afc690da8e9;p=pandora-kernel.git USB: keyspan: fix NULL-pointer dereferences and memory leaks Fix NULL-pointer dereference at release by moving port data allocation and deallocation to port_probe and port_remove. Fix NULL-pointer dereference at disconnect by stopping port urbs at port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer accessible at disconnect or release. Note that this patch also fixes port and interface-data memory leaks in the error path of attach should port initialisation fail for any port. Compile-only tested. Cc: Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed