瀏覽代碼

ath9k: Delete an unnecessary check before the function call "relay_close"

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>
Markus Elfring 10 年之前
父節點
當前提交
c0420ea0b5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/ath/ath9k/common-spectral.c

+ 1 - 1
drivers/net/wireless/ath/ath9k/common-spectral.c

@@ -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)
 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);
 		relay_close(spec_priv->rfs_chan_spec_scan);
 		spec_priv->rfs_chan_spec_scan = NULL;
 		spec_priv->rfs_chan_spec_scan = NULL;
 	}
 	}