ath9k: Delete an unnecessary check before the function call "relay_close"
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 4 Feb 2015 17:48:28 +0000 (18:48 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 6 Feb 2015 06:49:22 +0000 (08:49 +0200)
The relay_close() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/common-spectral.c

index ec93ddf0863a169622ecaa80b643597853f4a7ca..5cee231cca1f99510e21410e362a1086cae19672 100644 (file)
@@ -582,7 +582,7 @@ static struct rchan_callbacks rfs_spec_scan_cb = {
 
 void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)
 {
-       if (config_enabled(CONFIG_ATH9K_DEBUGFS) && spec_priv->rfs_chan_spec_scan) {
+       if (config_enabled(CONFIG_ATH9K_DEBUGFS)) {
                relay_close(spec_priv->rfs_chan_spec_scan);
                spec_priv->rfs_chan_spec_scan = NULL;
        }