From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: David Herrmann <dh.herrmann@googlemail.com>,
linux-bluetooth@vger.kernel.org, padovan@profusion.mobi
Subject: Re: [PATCH] Bluetooth: vhci: Ignore return code of nonseekable_open()
Date: Wed, 28 Mar 2012 13:42:36 +0300 [thread overview]
Message-ID: <20120328104236.GA6653@x220> (raw)
In-Reply-To: <1332930313.1870.164.camel@aeonflux>
Hi,
On Wed, Mar 28, 2012, Marcel Holtmann wrote:
> > 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>
> > ---
> > 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@holtmann.org>
Applied to bluetooth-next. Thanks.
Johan
prev parent reply other threads:[~2012-03-28 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 9:48 [PATCH] Bluetooth: vhci: Ignore return code of nonseekable_open() David Herrmann
2012-03-28 10:25 ` Marcel Holtmann
2012-03-28 10:42 ` Johan Hedberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120328104236.GA6653@x220 \
--to=johan.hedberg@gmail.com \
--cc=dh.herrmann@googlemail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=padovan@profusion.mobi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox