From: Peter Hurley Date: Mon, 10 Feb 2014 01:59:20 +0000 (-0500) Subject: Bluetooth: Cleanup RFCOMM device registration error handling X-Git-Tag: v3.15-rc1~113^2~159^2^2~130^2~54 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb856e50900a84dd9f8d50d3882eb4a26ba6ea54;p=pandora-kernel.git Bluetooth: Cleanup RFCOMM device registration error handling If RFCOMM tty device registration fails, cleanup by releasing the tty_port reference to trigger rfcomm_dev destruction (rather than open-coding it). The dlc reference release is moved into rfcomm_dev_add(), which ensures cleanup in both error paths -- ie., if __rfcomm_dev_add() fails or if tty_port_register_device() fails. Fixes releasing the module reference if device registration fails. Signed-off-by: Peter Hurley Tested-By: Alexander Holler Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed