Re: [PATCH] Bluetooth: vhci: Ignore return code of nonseekable_open()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

> The comment in ./fs/open.c clearly states that nonseekable_open() will
> never fail. Therefore, we can safely ignore the return code. This is the
> recommended way to deal with nonseekable_open().
> Our current code looks like nonseekable_open() is checked for the return
> code. However, if we check the return code, we must also kfree() our
> private data if the open fails. To avoid this overhead and to avoid
> confusion, we simply drop the return code and return 0.
> 
> Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxxxxxxx>
> ---
> See the UHID discussion for more information. Marcel suggested to also fix vhci
> so here is the patch ;)
> 
>  drivers/bluetooth/hci_vhci.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>

Regards

Marcel


--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux