Re: [patch] Bluetooth: fix ->alloc_skb() error checking

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

 



On Mon, Dec 16, 2013 at 04:35:25PM -0400, Anderson Lizardo wrote:
> Hi Dan,
> 
> On Mon, Dec 16, 2013 at 4:28 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> > @@ -2413,8 +2413,8 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
> >
> >         skb = chan->ops->alloc_skb(chan, count + L2CAP_HDR_SIZE,
> >                                    msg->msg_flags & MSG_DONTWAIT);
> > -       if (IS_ERR(skb))
> > -               return skb;
> > +       if (skb)
> > +               return ERR_PTR(-ENOMEM);
> 
> It should be "!skb" above right?
> 

Gar....  I'm so sorry about that.

regards,
dan carpenter

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