diff options
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r-- | drivers/base/firmware_class.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 3d785ebb48d3..58470c395301 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -591,8 +591,7 @@ static int fw_map_pages_buf(struct firmware_buf *buf) if (!buf->is_paged_buf) return 0; - if (buf->data) - vunmap(buf->data); + vunmap(buf->data); buf->data = vmap(buf->pages, buf->nr_pages, 0, PAGE_KERNEL_RO); if (!buf->data) return -ENOMEM; @@ -925,7 +924,7 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD); } - wait_for_completion(&buf->completion); + retval = wait_for_completion_interruptible(&buf->completion); cancel_delayed_work_sync(&fw_priv->timeout_work); if (is_fw_load_aborted(buf)) @@ -1004,7 +1003,7 @@ static int sync_cached_firmware_buf(struct firmware_buf *buf) break; } mutex_unlock(&fw_lock); - wait_for_completion(&buf->completion); + ret = wait_for_completion_interruptible(&buf->completion); mutex_lock(&fw_lock); } mutex_unlock(&fw_lock); |