firmware_loader: abort request if wait_for_completion is interrupted
[deliverable/linux.git] / drivers / base / firmware_class.c
index 58470c3953015b7180de159082b154e5eef70256..5870ec35efe6d9df196606771d24c5a224cbe9d9 100644 (file)
@@ -927,6 +927,13 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
        retval = wait_for_completion_interruptible(&buf->completion);
 
        cancel_delayed_work_sync(&fw_priv->timeout_work);
+
+       if (retval == -ERESTARTSYS) {
+               mutex_lock(&fw_lock);
+               fw_load_abort(fw_priv);
+               mutex_unlock(&fw_lock);
+       }
+
        if (is_fw_load_aborted(buf))
                retval = -EAGAIN;
        else if (!buf->data)
@@ -1194,7 +1201,7 @@ request_firmware(const struct firmware **firmware_p, const char *name,
 EXPORT_SYMBOL(request_firmware);
 
 /**
- * request_firmware: - load firmware directly without usermode helper
+ * request_firmware_direct: - load firmware directly without usermode helper
  * @firmware_p: pointer to firmware image
  * @name: name of firmware file
  * @device: device for which firmware is being loaded
This page took 0.024344 seconds and 5 git commands to generate.