summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/bfusb.c
diff options
context:
space:
mode:
authorValentin Ilie <valentin.ilie@gmail.com>2013-08-12 17:46:00 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-05 19:52:17 +0100
commita08b15e66e8ec700992641cf8ec015032e8365c8 (patch)
tree01554c5c6963be9da6ba573af135ec7a65f8a9d7 /drivers/bluetooth/bfusb.c
parentBluetooth: Fix removing Long Term Key (diff)
downloadlinux-a08b15e66e8ec700992641cf8ec015032e8365c8.tar.xz
linux-a08b15e66e8ec700992641cf8ec015032e8365c8.zip
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.c14
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) {