mwifiex: remove redundant 'adapter' check in mwifiex_adapter_cleanup
authorBrian Norris <briannorris@chromium.org>
Fri, 12 May 2017 16:42:05 +0000 (09:42 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 19 May 2017 06:01:58 +0000 (09:01 +0300)
We're using 'adapter' right before calling this. Stop being
unnecessarily paranoid.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/init.c

index 2bff87bd76a65b023845ec401f5348ae8a55167d..80bdf1c5f77fd06fb1f3e1a64541b5d6b100b9a9 100644 (file)
@@ -409,11 +409,6 @@ static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
 static void
 mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
 {
-       if (!adapter) {
-               pr_err("%s: adapter is NULL\n", __func__);
-               return;
-       }
-
        del_timer(&adapter->wakeup_timer);
        mwifiex_cancel_all_pending_cmd(adapter);
        wake_up_interruptible(&adapter->cmd_wait_q.wait);