mwifiex: 11h: drop unnecessary check for '!priv'
authorBrian Norris <briannorris@chromium.org>
Fri, 12 May 2017 16:42:06 +0000 (09:42 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 19 May 2017 06:01:58 +0000 (09:01 +0300)
These pointers are retrieved via container_of(). There's no way they are
NULL.

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

index 366eb4991a7d88ffbd2965a43449f74e1ab7e551..238accfe4f41deb9e6505deb2e92d946f2e51cc6 100644 (file)
@@ -128,9 +128,6 @@ void mwifiex_dfs_cac_work_queue(struct work_struct *work)
                        container_of(delayed_work, struct mwifiex_private,
                                     dfs_cac_work);
 
-       if (WARN_ON(!priv))
-               return;
-
        chandef = priv->dfs_chandef;
        if (priv->wdev.cac_started) {
                mwifiex_dbg(priv->adapter, MSG,
@@ -289,9 +286,6 @@ void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work)
                        container_of(delayed_work, struct mwifiex_private,
                                     dfs_chan_sw_work);
 
-       if (WARN_ON(!priv))
-               return;
-
        bss_cfg = &priv->bss_cfg;
        if (!bss_cfg->beacon_period) {
                mwifiex_dbg(priv->adapter, ERROR,