In routine rtl92de_hw_init(), there are two places where a failure is
not handled correctly.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
                RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
                         ("Failed to download FW. Init HW "
                         "without FW..\n"));
-               err = 1;
                rtlhal->fw_ready = false;
+               return 1;
        } else {
                rtlhal->fw_ready = true;
        }
                                if (((tmp_rega & BIT(11)) == BIT(11)))
                                        break;
                        }
+                       /* check that loop was successful. If not, exit now */
+                       if (i == 10000) {
+                               rtlpci->init_ready = false;
+                               return 1;
+                       }
                }
        }
        rtlpci->init_ready = true;