staging: rtl8188eu: simplify nested ifs
authorLuca Ceresoli <luca@lucaceresoli.net>
Thu, 16 Apr 2015 21:28:04 +0000 (23:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 07:24:10 +0000 (09:24 +0200)
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/os_intfs.c

index e5e9235..9cd3a84 100644 (file)
@@ -224,11 +224,9 @@ void rtw_proc_init_one(struct net_device *dev)
                                          rtw_proc);
                dir_dev = padapter->dir_dev;
                if (dir_dev == NULL) {
-                       if (rtw_proc_cnt == 0) {
-                               if (rtw_proc) {
-                                       remove_proc_entry(rtw_proc_name, init_net.proc_net);
-                                       rtw_proc = NULL;
-                               }
+                       if (rtw_proc_cnt == 0 && rtw_proc) {
+                               remove_proc_entry(rtw_proc_name, init_net.proc_net);
+                               rtw_proc = NULL;
                        }
 
                        pr_info("Unable to create dir_dev directory\n");