iwlwifi: don't print module loading error if not modular
authorJohannes Berg <johannes.berg@intel.com>
Tue, 28 May 2013 19:32:47 +0000 (21:32 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Jun 2013 11:12:07 +0000 (13:12 +0200)
If the opmode modules aren't modular, there's no point in
printing an error message that request_module() failed.
This will happen because the probe runs during iwlwifi's
init and the opmode is only added during its init.

Reported-by: Jörg Otte <jrg.otte@gmail.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/iwl-drv.c

index 39aad9893e0b1d6df218655959b77e292721babe..40fed1f511e23e546d64ec1d7c69b3c9f196a16a 100644 (file)
@@ -1000,10 +1000,12 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
         */
        if (load_module) {
                err = request_module("%s", op->name);
+#ifdef CONFIG_IWLWIFI_OPMODE_MODULAR
                if (err)
                        IWL_ERR(drv,
                                "failed to load module %s (error %d), is dynamic loading enabled?\n",
                                op->name, err);
+#endif
        }
        return;