]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/base/firmware_class.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
[karo-tx-linux.git] / drivers / base / firmware_class.c
index 8c798ef7f13fcc25ea1627ed3870dca0b97d1a21..bbb03e6f7255b715e894080e66a7ccfae34b2c24 100644 (file)
@@ -521,6 +521,11 @@ static int _request_firmware(const struct firmware **firmware_p,
        if (!firmware_p)
                return -EINVAL;
 
+       if (WARN_ON(usermodehelper_is_disabled())) {
+               dev_err(device, "firmware: %s will not be loaded\n", name);
+               return -EBUSY;
+       }
+
        *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
        if (!firmware) {
                dev_err(device, "%s: kmalloc(struct firmware) failed\n",