linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Rymarkiewicz Waldemar <waldemar.rymarkiewicz@tieto.com>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	"padovan@profusion.mobi" <padovan@profusion.mobi>,
	Waldemar Rymarkiewicz <waldemar.rymarkiewicz@gmail.com>
Subject: Re: [PATCH] Bluetooth: Fix possible NULL pointer dereference
Date: Thu, 22 Sep 2011 12:58:41 +0200	[thread overview]
Message-ID: <1316689122.1937.124.camel@aeonflux> (raw)
In-Reply-To: <4E7B0DBF.7060406@tieto.com>

Hi Waldemar,

> >>   	conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK,&ev->bdaddr);
> >> -	if (conn&&  conn->state == BT_CONNECTED) {
> >> -		hci_conn_hold(conn);
> >> -		conn->disc_timeout = HCI_PAIRING_TIMEOUT;
> >> -		hci_conn_put(conn);
> >> -	}
> >> +	if (conn) {
> >
> > what is from with this:
> >
> > 	if (!conn)
> > 		goto unlock;
> >
> 
> Well, the file is mixed in style, thus I chose the style as for nearby 
> functions. Anyway, if this form is preferable let me know and will update.

for simple code pieces, I don't really mind, but this function is
getting more and more complicated. So less indentation is preferred.

Regards

Marcel



  reply	other threads:[~2011-09-22 10:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21  7:08 Bluetooth: Add secure flag for mgmt_pin_code_req Dan Carpenter
2011-09-21 13:17 ` Rymarkiewicz Waldemar
2011-09-22  5:58 ` [PATCH] Bluetooth: Fix possible NULL pointer dereference Waldemar Rymarkiewicz
2011-09-22  9:51   ` Marcel Holtmann
2011-09-22 10:28     ` Rymarkiewicz Waldemar
2011-09-22 10:58       ` Marcel Holtmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-06-17 15:45 [PATCH] Bluetooth : " Thomas Gagneret

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=1316689122.1937.124.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    --cc=waldemar.rymarkiewicz@gmail.com \
    --cc=waldemar.rymarkiewicz@tieto.com \
    /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;
as well as URLs for NNTP newsgroup(s).