From: Anderson Lizardo Date: Mon, 29 Nov 2010 16:15:50 +0000 (-0400) Subject: Bluetooth: Fix error handling for l2cap_init() X-Git-Tag: v2.6.38-rc1~476^2~276^2^2~10^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b78d7b4f204a6ba1901af36c95e10fded9816054;p=pandora-kernel.git Bluetooth: Fix error handling for l2cap_init() create_singlethread_workqueue() may fail with errors such as -ENOMEM. If this happens, the return value is not set to a negative value and the module load will succeed. It will then crash on module unload because of a destroy_workqueue() call on a NULL pointer. Additionally, the _busy_wq workqueue is not being destroyed if any errors happen on l2cap_init(). Signed-off-by: Anderson Lizardo Signed-off-by: Gustavo F. Padovan --- Reading git-diff-tree failed