From: Sujith Manoharan <c_man...@qca.qualcomm.com>

drivers/net/wireless/ath/main.c:88 ath_printk()
         error: we previously assumed 'common->hw' could be null (see line 82)

Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: Sujith Manoharan <c_man...@qca.qualcomm.com>
---
 drivers/net/wireless/ath/main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c
index 83f47af..338d723 100644
--- a/drivers/net/wireless/ath/main.c
+++ b/drivers/net/wireless/ath/main.c
@@ -79,13 +79,13 @@ void ath_printk(const char *level, const struct ath_common* 
common,
        vaf.fmt = fmt;
        vaf.va = &args;
 
-       if (common && common->hw && common->hw->wiphy)
+       if (common && common->hw && common->hw->wiphy) {
                printk("%sath: %s: %pV",
                       level, wiphy_name(common->hw->wiphy), &vaf);
-       else
+               trace_ath_log(common->hw->wiphy, &vaf);
+       } else {
                printk("%sath: %pV", level, &vaf);
-
-       trace_ath_log(common->hw->wiphy, &vaf);
+       }
 
        va_end(args);
 }
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to