Bluetooth: Add return parameter to cmd_complete callbacks
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 19 Dec 2014 20:26:03 +0000 (22:26 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 19 Dec 2014 21:06:37 +0000 (22:06 +0100)
commit9df7465351c00707d7d63a52e01187a6e169fe4a
tree6ac2553c44566bdc3de3a8edc89b16249f735c93
parent5a154e6f71dfd41c7b5cf96a13c83fca91e7df7f
Bluetooth: Add return parameter to cmd_complete callbacks

The cmd_complete callbacks for pending mgmt commands may fail e.g. in
the case of memory allocation. Previously this error would be caught and
returned to user space in the form of a failed write on the mgmt socket
(when the error happened in the mgmt command handler) but with the
introduction of the generic cmd_complete callback this information was
lost. This patch returns the feature by making cmd_complete callbacks
return int instead of void.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c