initramfs: fix initramfs size calculation
[linux-drm-fsl-dcu.git] / net / wireless / chan.c
index d92d088026bf885e30607f81799781a4c94c2794..b01a6f6397d7be03659547f98f06569011ffac77 100644 (file)
@@ -50,7 +50,7 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
        struct ieee80211_channel *chan;
        int result;
 
-       if (wdev->iftype == NL80211_IFTYPE_MONITOR)
+       if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
                wdev = NULL;
 
        if (wdev) {