diff options
author | Valentin Ilie <valentin.ilie@gmail.com> | 2013-08-12 18:46:00 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-05 20:52:17 +0200 |
commit | a08b15e66e8ec700992641cf8ec015032e8365c8 (patch) | |
tree | 01554c5c6963be9da6ba573af135ec7a65f8a9d7 /drivers/bluetooth/bfusb.c | |
parent | 5981a8821b774ada0be512fd9bad7c241e17657e (diff) |
Bluetooth: Remove assignments in if-statements
Remove assignment in if-statements to be consistent with the coding
style.
Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/bfusb.c')
-rw-r--r-- | drivers/bluetooth/bfusb.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index 31386998c9a7..b2e7e94a6771 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c @@ -131,8 +131,11 @@ static int bfusb_send_bulk(struct bfusb_data *data, struct sk_buff *skb) 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 +221,11 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb) 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; + } skb = bt_skb_alloc(size, GFP_ATOMIC); if (!skb) { |