[BUGFIX] cfg80211: fix NULL pointer derference when querying regdb

Some drivers may call this function when regdb is not initialized yet,
so we need to make sure regdb is valid before trying to access it.

Make sure regdb is initialized before trying to access it in
reg_query_regdb_wmm() and query_regdb().

type=bugfix
ticket=none
fixes=I2b64c9d2d802ebfd8209f2a0672bd3ca730f3dfb

Change-Id: I670249a76f8151d1909e3e3533b7cf19a31753f4
Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Dreyfuss, Haim <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/174765
automatic-review: ec ger unix iil jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Tested-by: ec ger unix iil jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/175183
x-iwlwifi-stack-dev: 9608df0848bd084ddbfeb2eaddf80fac2d261fa0
2 files changed