public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] bluetooth:bfusb.c Clean assigment in if condition.
@ 2013-11-11  4:06 Luca Bartolacci
  2013-11-11  7:59 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Bartolacci @ 2013-11-11  4:06 UTC (permalink / raw)
  To: kernel-janitors

I'm not sure if the change is justified.
An other question is. Can i "clean" a complete directory (Like
/bluetooth) an put it all in one patch? That way is more easy for you?
Im asking all these questions to understand what is better to avoid
spam to the others.
Im sure the these questions are dumb. But i really want to help to this project.

index 3138699..08fba91 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -131,8 +131,10 @@ static int bfusb_send_bulk(struct bfusb_data *data, struct

        BT_DBG("bfusb %p skb %p len %d", data, skb, skb->len);

-       if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
-               return -ENOMEM;
+       if (!urb)
+               urb = usb_alloc_urb(0, GFP_ATOMIC);
+               if (!urb)
+                       return -ENOMEM;

        pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep);


@@ -218,8 +220,10 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct

        BT_DBG("bfusb %p urb %p", data, urb);

-       if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
-               return -ENOMEM;
+       if (!urb)
+               urb = usb_alloc_urb(0, GFP_ATOMIC);
+               if (!urb)
+                       return -ENOMEM;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch 2/2] bluetooth:bfusb.c Clean assigment in if condition.
  2013-11-11  4:06 [patch 2/2] bluetooth:bfusb.c Clean assigment in if condition Luca Bartolacci
@ 2013-11-11  7:59 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2013-11-11  7:59 UTC (permalink / raw)
  To: kernel-janitors

On Mon, Nov 11, 2013 at 02:06:21AM -0200, Luca Bartolacci wrote:
> I'm not sure if the change is justified.
> An other question is. Can i "clean" a complete directory (Like
> /bluetooth) an put it all in one patch? That way is more easy for you?
> Im asking all these questions to understand what is better to avoid
> spam to the others.
> Im sure the these questions are dumb. But i really want to help to this project.
> 

This change introduces bugs.

No signed-off-by line either, btw.

regards,
dan carpenter

> index 3138699..08fba91 100644
> --- a/drivers/bluetooth/bfusb.c
> +++ b/drivers/bluetooth/bfusb.c
> @@ -131,8 +131,10 @@ static int bfusb_send_bulk(struct bfusb_data *data, struct
> 
>         BT_DBG("bfusb %p skb %p len %d", data, skb, skb->len);
> 
> -       if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
> -               return -ENOMEM;
> +       if (!urb)
> +               urb = usb_alloc_urb(0, GFP_ATOMIC);
> +               if (!urb)
> +                       return -ENOMEM;
> 
>         pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep);
> 
> 
> @@ -218,8 +220,10 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct
> 
>         BT_DBG("bfusb %p urb %p", data, urb);
> 
> -       if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
> -               return -ENOMEM;
> +       if (!urb)
> +               urb = usb_alloc_urb(0, GFP_ATOMIC);
> +               if (!urb)
> +                       return -ENOMEM;
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11  4:06 [patch 2/2] bluetooth:bfusb.c Clean assigment in if condition Luca Bartolacci
2013-11-11  7:59 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox