Hi, On Sat, Dec 13, 2014, Johan Hedberg wrote: > On Fri, Dec 12, 2014, Toshi Kikuchi wrote: > > + skb = __hci_cmd_sync(hdev, 0xfc0b, sizeof(buf), buf, HCI_INIT_TIMEOUT); > > + if (IS_ERR(skb)) { > > + ret = PTR_ERR(skb); > > + BT_ERR("%s: Change address command failed (%ld)", > > + hdev->name, ret); > > + return ret; > > + } > > + kfree_skb(skb); > > Don't you need to peek into the received skb to get the command status > as well? Or this command can never fail? Nevermind, I just realized that __hci_cmd_sync() has an extra "convenience" feature where it should check for the status in standard cmd_complete events and return it as a direct error (i.e. your IS_ERR branch should take care of it). Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html