]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: vhci: Ignore return code of nonseekable_open()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Wed, 28 Mar 2012 09:48:42 +0000 (11:48 +0200)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 28 Mar 2012 15:29:01 +0000 (12:29 -0300)
commit6c12ba95d01d51882f15a8113e8624a2fdc2ed0d
tree44da93488e013bfa0b4f5b86598ad2ef219b8059
parent7cb2a5dc9eae4634a3e5c2bb0283869fefbc7255
Bluetooth: vhci: Ignore return code of nonseekable_open()

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@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_vhci.c