diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-09-27 12:46:18 +0200 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-09-27 12:46:18 +0200 |
commit | 5e68b9c311afd867e92f0d71b1121d677698bba1 (patch) | |
tree | 5db57e4f74b5532dcf425f4a1b3cad9c27a4afaf /drivers | |
parent | 1db97176edf3b4c031c25ad3b6315b1ea593ee9c (diff) |
rt2x00: fix null pointer in clock check for non-soc chipsColibri-iMX7_LXDE-Image_2.8b4.129-20181005Colibri-iMX6_LXDE-Image_2.8b4.129-20181005Colibri-iMX6ULL_LXDE-Image_2.8b4.129-20181005Colibri-VF_LXDE-Image_2.8b4.129-20181005Colibri-T30_LXDE-Image_2.8b4.129-20181005Colibri-T20_LXDE-Image_2.8b4.129-20181005Apalis-iMX6_LXDE-Image_2.8b4.129-20181005Apalis-TK1_LXDE-Image_2.8b4.129-20181005Apalis-T30_LXDE-Image_2.8b4.129-20181005
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 |
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 |