Re: [PATCH] bluetooth: Add hci_h4p driver

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

 



Hi!

> > +	/* We should always send word aligned data to h4+ devices */
> > +	if (skb->len % 2) {
> > +		err = skb_pad(skb, 1);
> > +		if (!err)
> > +			*skb_put(skb, 1) = 0x00;
> > +	}
> > +	if (err)
> > +		return err;
> 
> This is crazy code.
> 
> 	if (skb->len % 2) {
> 		if (!skb_pad(skb, 1)
> 			return -ENOMEM;
> 		*skb_put(skb, 1) = 0x00;
> 	}

This does not work, it needs to be if (skb_pad())... and it does not
propagate error value. Took me few boots to debug, as I still can't
scroll back after kernel crash...
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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