Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3756392pxt; Tue, 10 Aug 2021 10:35:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8+rfKb8inje2igA1MKfZccuEkG8+tQeM8D0qNphsmgjQ68BjC/fM9K21XDi+qrUb5qSXS X-Received: by 2002:aa7:d841:: with SMTP id f1mr6332290eds.196.1628616899238; Tue, 10 Aug 2021 10:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628616899; cv=none; d=google.com; s=arc-20160816; b=ywsaVOPrSBImoLfuft/yaoQt9Ayl0XUNrL/QRmXz8koEBvUfo5LJ+Nyao5WIn8h+/U J/0fNKdDhFgcfI8f+cVVwkPa+SVH9kW7d5xO6umVOTWyE/rb6K741MP7AwRdHQl0dwVp alh9kKkWreYAjFYuIDbrYbZfKcZg4XiKMv70WON+FEn3Jzgm7sQlluqrHapkMZSyPmaX ZAAkfP/LFXqEQRFs0kdnaEd0nQ6h7l3Hr+5U1z2PYhBZTVWrztQ/SNKVHNtZD7dF2wHz dybz2o09TvhirF7Te7Wl9y5UzVCoY7yDk+VnOTO8FYsZ/sjvJsJlB7kj5RkmV/EF31LI Y8uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eEzc85YV7y25U3fIyVTVpVY8k/b5VFA9LubKJIxxF4A=; b=iuPK+8pjOKeBlKyd6pxFMtakArykO1QDVQXsXgFtDhht7QVBDzNBzUgh5e3OT+sm77 PtnU5A/804VhBi++7d2Ykru7JONyBrF//MKDk2sfH/Z/vM12YYdiprKXlynNwYOZCZjf 2SWXJkzv2XcbmiJqVN0/jg/NqGZvmIL98ISqxk8F7pk2ZmX18EexlLQU70ojzFv00Rcz PZEXUICOd7xvimB0TKt+U2n9pL+cEUgqx3YT+8scjsxWVN9rXixCQqCq3zlYSZsYJOV7 XAJHdUJIwizJ+AIMfEBEZFNRTXevH1b+oI1B8/UBkTj1tAqSZNzNmHrAbBMP9mOomeHf bQMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L51+VaNl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l21si22309298edw.523.2021.08.10.10.34.35; Tue, 10 Aug 2021 10:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L51+VaNl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231580AbhHJRc4 (ORCPT + 99 others); Tue, 10 Aug 2021 13:32:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:33258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhHJRcm (ORCPT ); Tue, 10 Aug 2021 13:32:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6DA9B60F94; Tue, 10 Aug 2021 17:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616739; bh=d3zBzhSd99CWVBT9rN43GfypKWv50i8yK0avktkkfJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L51+VaNljCuGc/FpU6nDngNVVuZMMgSOQkhA5CZH0Jq+P0RxF6FJMyH4iju/GzntW j1v/H48IoUm/lThoHvEjl9rOmZef8hpFZwcF4i+sIH5KFYAw3G+ad7nwg+5eodTMad UcP9kagGk6BEfsAMUNOLg7nM6YJjMKrh7hTdcNIU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luis Chamberlain , Shuah Khan , Anirudh Rayabharam Subject: [PATCH 4.19 25/54] firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback Date: Tue, 10 Aug 2021 19:30:19 +0200 Message-Id: <20210810172945.006060660@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anirudh Rayabharam commit 0d6434e10b5377a006f6dd995c8fc5e2d82acddc upstream. The only motivation for using -EAGAIN in commit 0542ad88fbdd81bb ("firmware loader: Fix _request_firmware_load() return val for fw load abort") was to distinguish the error from -ENOMEM, and so there is no real reason in keeping it. -EAGAIN is typically used to tell the userspace to try something again and in this case re-using the sysfs loading interface cannot be retried when a timeout happens, so the return value is also bogus. -ETIMEDOUT is received when the wait times out and returning that is much more telling of what the reason for the failure was. So, just propagate that instead of returning -EAGAIN. Suggested-by: Luis Chamberlain Reviewed-by: Shuah Khan Acked-by: Luis Chamberlain Signed-off-by: Anirudh Rayabharam Cc: stable Link: https://lore.kernel.org/r/20210728085107.4141-2-mail@anirudhrb.com Signed-off-by: Greg Kroah-Hartman --- drivers/base/firmware_loader/fallback.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/base/firmware_loader/fallback.c +++ b/drivers/base/firmware_loader/fallback.c @@ -581,8 +581,6 @@ static int fw_load_sysfs_fallback(struct if (fw_state_is_aborted(fw_priv)) { if (retval == -ERESTARTSYS) retval = -EINTR; - else - retval = -EAGAIN; } else if (fw_priv->is_paged_buf && !fw_priv->data) retval = -ENOMEM;