staging: gdm72xx: Fix braces to conform with coding style
authorMichalis Pappas <mpappas@fastmail.fm>
Fri, 9 May 2014 10:08:25 +0000 (18:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 19:12:52 +0000 (12:12 -0700)
Fixes the following checkpatch.pl issue:

CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/gdm_wimax.c
drivers/staging/gdm72xx/netlink_k.c

index 05ce2a22c22049c77d4c875145c8cba29ce20f48..814d2e4d6db2a338bae11ae6ba0cd84ddb082214 100644 (file)
@@ -263,9 +263,9 @@ static struct evt_entry *get_event_entry(void)
 {
        struct evt_entry *e;
 
-       if (list_empty(&wm_event.freeq))
+       if (list_empty(&wm_event.freeq)) {
                e = alloc_event_entry();
-       else {
+       else {
                e = list_entry(wm_event.freeq.next, struct evt_entry, list);
                list_del(&e->list);
        }
@@ -379,9 +379,9 @@ static int gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev)
        }
 
        #if !defined(LOOPBACK_TEST)
-       if (!fsm)
+       if (!fsm) {
                netdev_err(dev, "ASSERTION ERROR: fsm is NULL!!\n");
-       else if (fsm->m_status != M_CONNECTED) {
+       else if (fsm->m_status != M_CONNECTED) {
                netdev_emerg(dev, "ASSERTION ERROR: Device is NOT ready. status=%d\n",
                             fsm->m_status);
                kfree_skb(skb);
@@ -544,9 +544,9 @@ static void gdm_update_fsm(struct net_device *dev, struct fsm_s *new_fsm)
 
        if (cur_fsm->m_status != new_fsm->m_status ||
                cur_fsm->c_status != new_fsm->c_status) {
-               if (new_fsm->m_status == M_CONNECTED)
+               if (new_fsm->m_status == M_CONNECTED) {
                        netif_carrier_on(dev);
-               else if (cur_fsm->m_status == M_CONNECTED) {
+               else if (cur_fsm->m_status == M_CONNECTED) {
                        netif_carrier_off(dev);
                        #if defined(CONFIG_WIMAX_GDM72XX_QOS)
                        gdm_qos_release_list(nic);
@@ -855,9 +855,9 @@ static void prepare_rx_complete(void *arg, void *data, int len)
        int ret;
 
        ret = gdm_wimax_get_prepared_info(nic->netdev, data, len);
-       if (ret == 1)
+       if (ret == 1) {
                gdm_wimax_rcv_with_cb(nic, rx_complete, nic);
-       else {
+       else {
                if (ret < 0)
                        netdev_err(nic->netdev,
                                   "get_prepared_info failed(%d)\n", ret);
index af7f1c1d0b5cb0ea69701a178e707d294da96f30..52317c724969e32452915986b9e5c2743003c100 100644 (file)
@@ -75,8 +75,9 @@ static void netlink_rcv_cb(struct sk_buff *skb)
                                netdev_err(skb->dev,
                                           "dev_get_by_index(%d) is not found.\n",
                                           ifindex);
-               } else
+               } else {
                        netdev_err(skb->dev, "Unregistered Callback\n");
+               }
        }
 }
 
@@ -144,9 +145,9 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
 
        ret = netlink_broadcast(sock, skb, 0, group+1, GFP_ATOMIC);
 
-       if (!ret)
+       if (!ret) {
                return len;
-       else {
+       else {
                if (ret != -ESRCH) {
                        pr_err("netlink_broadcast g=%d, t=%d, l=%d, r=%d\n",
                               group, type, len, ret);