Hi Jakub, On Thu, Oct 15, 2015, Jakub Pawlowski wrote: > This patch makes sure that conn_params that were created just for > explicit_connect, will get properly deleted during cleanup. > > Signed-off-by: Jakub Pawlowski <jpawlowski@xxxxxxxxxx> > --- > net/bluetooth/hci_conn.c | 22 +++++++++++++++------- > net/bluetooth/mgmt.c | 6 +++++- > 2 files changed, 20 insertions(+), 8 deletions(-) This one looks good to me, except: > - params = hci_conn_params_add(hdev, addr, addr_type); > - if (!params) > - return -EIO; > + params = hci_conn_params_lookup(hdev, addr, addr_type); > + if (!params) { > + params = hci_conn_params_add(hdev, addr, addr_type); > + if (!params) > + return -EIO; I know it's in the original code, but since you're changing these lines it might make sense to fix the error code to be something reasonable. The only case hci_conn_params_add() will fail is memory allocation failure, so EIO is kind of weird. ENOMEM would be more appropriate. 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