public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-bluetooth@vger.kernel.org, padovan@profusion.mobi,
	johan.hedberg@gmail.com
Subject: Re: [PATCH] Bluetooth: vhci: Ignore return code of nonseekable_open()
Date: Wed, 28 Mar 2012 12:25:13 +0200	[thread overview]
Message-ID: <1332930313.1870.164.camel@aeonflux> (raw)
In-Reply-To: <1332928122-10919-1-git-send-email-dh.herrmann@googlemail.com>

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

Regards

Marcel



  reply	other threads:[~2012-03-28 10:25 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 [this message]
2012-03-28 10:42   ` Johan Hedberg

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=1332930313.1870.164.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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