summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2018-09-27 12:46:18 +0200
committerDominik Sliwa <dominik.sliwa@toradex.com>2018-09-27 12:46:18 +0200
commit5e68b9c311afd867e92f0d71b1121d677698bba1 (patch)
tree5db57e4f74b5532dcf425f4a1b3cad9c27a4afaf /drivers
parent1db97176edf3b4c031c25ad3b6315b1ea593ee9c (diff)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2800lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 51d0ac1..a707ff1 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -2066,7 +2066,10 @@ static void rt2800_config_lna_gain(struct rt2x00_dev *rt2x00dev,
static inline bool rt2800_clk_is_20mhz(struct rt2x00_dev *rt2x00dev)
{
- return clk_get_rate(rt2x00dev->clk) == 20000000;
+ if (rt2x00dev->clk)
+ return clk_get_rate(rt2x00dev->clk) == 20000000;
+ else
+ return false;
}
#define FREQ_OFFSET_BOUND 0x5f