From a08b15e66e8ec700992641cf8ec015032e8365c8 Mon Sep 17 00:00:00 2001 From: Valentin Ilie Date: Mon, 12 Aug 2013 18:46:00 +0300 Subject: Bluetooth: Remove assignments in if-statements Remove assignment in if-statements to be consistent with the coding style. Signed-off-by: Valentin Ilie Signed-off-by: Johan Hedberg --- drivers/bluetooth/dtl1_cs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/bluetooth/dtl1_cs.c') diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 52eed1f3565d..2bd8fad17206 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c @@ -153,7 +153,8 @@ static void dtl1_write_wakeup(dtl1_info_t *info) if (!pcmcia_dev_present(info->p_dev)) return; - if (!(skb = skb_dequeue(&(info->txq)))) + skb = skb_dequeue(&(info->txq)); + if (!skb) break; /* Send frame */ @@ -215,13 +216,15 @@ static void dtl1_receive(dtl1_info_t *info) info->hdev->stat.byte_rx++; /* Allocate packet */ - if (info->rx_skb == NULL) - if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { + if (info->rx_skb == NULL) { + info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC); + if (!info->rx_skb) { BT_ERR("Can't allocate mem for new packet"); info->rx_state = RECV_WAIT_NSH; info->rx_count = NSHL; return; } + } *skb_put(info->rx_skb, 1) = inb(iobase + UART_RX); nsh = (nsh_t *)info->rx_skb->data; -- cgit v1.2.3