From: Shuah Khan Date: Wed, 23 Jul 2014 00:10:38 +0000 (-0600) Subject: firmware loader: Fix _request_firmware_load() return val for fw load abort X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0542ad88fbdd81bbd53f48bff981a9867e0f0659;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git firmware loader: Fix _request_firmware_load() return val for fw load abort _request_firmware_load() returns -ENOMEM when fw load is aborted after timeout. Call is_fw_load_aborted() to check if fw load is aborted and if true return -EAGAIN. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 124d50ceb116..da77791793f1 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -906,7 +906,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, wait_for_completion(&buf->completion); cancel_delayed_work_sync(&fw_priv->timeout_work); - if (!buf->data) + if (is_fw_load_aborted(buf)) + retval = -EAGAIN; + else if (!buf->data) retval = -ENOMEM; device_remove_file(f_dev, &dev_attr_loading);