# Re: \[PATCH v4\] Bluetooth: Fix return value in hci\_dev\_do\_close()

- From: Marcel Holtmann \<marcel@holtmann.org\>
- Date: 2021-08-19 15:29:20 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/08/1483054
- Thread: https://ratatoskr.run/linux-bluetooth/2021/08/1483047/t.md

```text
Hi Kangmin,

> hci_error_reset() return without calling hci_dev_do_open() when
> hci_dev_do_close() return error value which is not 0.
> 
> Also, hci_dev_close() return hci_dev_do_close() function's return
> value.
> 
> But, hci_dev_do_close() return always 0 even if hdev->shutdown
> return error value. So, fix hci_dev_do_close() to save and return
> the return value of the hdev->shutdown when it is called.
> 
> Signed-off-by: Kangmin Park <redacted>
> ---
> Changes in v4:
> - rename variable to err.
> 
> net/bluetooth/hci_core.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

```
