Re: [PATCH v2 6/6] Bluetooth: Check req->err in hci_req_add

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

 



Hi Andrei,

On Fri, Mar 08, 2013, Andrei Emeltchenko wrote:
> On Fri, Mar 08, 2013 at 09:50:09AM +0200, Johan Hedberg wrote:
> > Hi Andre,
> > 
> > On Thu, Mar 07, 2013, Andre Guedes wrote:
> > > +	if (req->err)
> > > +		return;
> > 
> > Same thing here with the error check, I think if (err < 0) is more
> > consistent.
> 
> Using "if (err)" seems to be OK for kernel and looks shorter.

It certainly seems to be more common than in user space, but I wouldn't say
it's the most common form:

jh@x220:linux{master}$ git grep 'if (err)' net/bluetooth/|wc -l
34
jh@x220:linux{master}$ git grep 'if (err < 0)' net/bluetooth/|wc -l
89
jh@x220:linux{master}$ 

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