staging: wilc1000: remove inner block in wilc_netdev_init()
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 2 May 2018 07:13:27 +0000 (12:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 May 2018 20:56:34 +0000 (13:56 -0700)
Cleanup patch to remove unnecessary inner block ( {/**/} ) in
wilc_netdev_init().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index 35e30c5ca7528a8e67e887e96a56283c243fab12..491baebb2a9e78d9209444f99e51506367f38439 100644 (file)
@@ -1141,6 +1141,8 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
        register_inetaddr_notifier(&g_dev_notifier);
 
        for (i = 0; i < NUM_CONCURRENT_IFC; i++) {
+               struct wireless_dev *wdev;
+
                ndev = alloc_etherdev(sizeof(struct wilc_vif));
                if (!ndev)
                        return -ENOMEM;
@@ -1163,28 +1165,24 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
 
                ndev->netdev_ops = &wilc_netdev_ops;
 
-               {
-                       struct wireless_dev *wdev;
-
-                       wdev = wilc_create_wiphy(ndev, dev);
+               wdev = wilc_create_wiphy(ndev, dev);
 
-                       if (dev)
-                               SET_NETDEV_DEV(ndev, dev);
+               if (dev)
+                       SET_NETDEV_DEV(ndev, dev);
 
-                       if (!wdev) {
-                               netdev_err(ndev, "Can't register WILC Wiphy\n");
-                               return -1;
-                       }
-
-                       vif->ndev->ieee80211_ptr = wdev;
-                       vif->ndev->ml_priv = vif;
-                       wdev->netdev = vif->ndev;
-                       vif->netstats.rx_packets = 0;
-                       vif->netstats.tx_packets = 0;
-                       vif->netstats.rx_bytes = 0;
-                       vif->netstats.tx_bytes = 0;
+               if (!wdev) {
+                       netdev_err(ndev, "Can't register WILC Wiphy\n");
+                       return -1;
                }
 
+               vif->ndev->ieee80211_ptr = wdev;
+               vif->ndev->ml_priv = vif;
+               wdev->netdev = vif->ndev;
+               vif->netstats.rx_packets = 0;
+               vif->netstats.tx_packets = 0;
+               vif->netstats.rx_bytes = 0;
+               vif->netstats.tx_bytes = 0;
+
                ret = register_netdev(ndev);
                if (ret)
                        return ret;