Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3765043pxt; Tue, 10 Aug 2021 10:47:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz47G2Ba10bekGNYtbylqXM73w0Ijectk+3WgJVLWwxT4Cu3xbxiyuAdH8QCsNa2O5dxrrG X-Received: by 2002:aa7:d607:: with SMTP id c7mr6489441edr.140.1628617652679; Tue, 10 Aug 2021 10:47:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617652; cv=none; d=google.com; s=arc-20160816; b=TTOJFXXnFX+rYT1lvY23rRFkq3FjFsx3Y5XzBktwmh21GvgSgBs3POlqQ8HaRkKPMf gw7q55+1LHM0LXq42EuL30strQ+U8Q4W8kZH/WyI0s5XUziwpTsN6Ff1TR6f1YoVkp49 TRBGF0qbte2vl3TO5DZOA8lSX+wQykehGpGBFzjR818KxN8FaWTomku4BmEMwdqnRfz9 UbkMfj5Nn20vjr/saR9YkbsCn8c1PrLziuZC03DAw/z+THZ2TZbH7JSrmgXordVfH99X AEbM/nGlQZVVaq3fpVlZETg9q0jiQ46fEQMn8qnkW6Dji4tOxQNun1CS8iEi0tAshRxU I7eQ== 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=sraq3NnUnItphc46FxbP87tMbD+nrEtbMiDfI2Sg7Fc=; b=Gw3ShKfXUPtQgJV3g2MLVuYoDF1CnQhPMYExu96Gx/ld8Ofv1LPYPbrHLqUwh8wghR VOOkub2pq93nANS+Fd3NPi17gdz+UScnJ/AuzLwKJ/icVWbLnmXi+nsXSI4N0kSSOEZX p85pEBcgSLAh20r7k7PvxaO9wZ27vVTqyynjnZIeuOLiKNag0re6lsOxZmJI8/zr307h Ae+GF79OrlJ9AkdgdNNhq+IqZxuGErjlFY9lbSLKuY3u3nKNAk49sH9P/YS/O7+a0WOj S/7eM0HRoGkvi+KNx1w4axYQ9iAvDkNxDXxGj8fh3tDnZp6E2GBsXxUO6xV/DZtAEkeg Qzvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQxX2saR; 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 de56si21026992ejc.111.2021.08.10.10.47.07; Tue, 10 Aug 2021 10:47:32 -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=mQxX2saR; 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 S235782AbhHJRqE (ORCPT + 99 others); Tue, 10 Aug 2021 13:46:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:42798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235332AbhHJRmK (ORCPT ); Tue, 10 Aug 2021 13:42:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BF81D61213; Tue, 10 Aug 2021 17:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617126; bh=BtGVrxVu9r2tER2gpA+k54WqsWJjhE2da9bywTuqZY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQxX2saRblpROcTAuDVpPm0eRfFqr7Xh5FHLUNHPhb5uINL/82q1Ar6I/uChyF1J8 kJeywUjaAghIvzfMT6EvHeZCufXTWfXSlnWSCwB8U4PxM7Ds3WulWYy4MoRZoX9Ah8 Vrr7ItsGkiLAOjDs6Mi1fQzd52bJjv5UCh/JWNkg= 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 5.10 056/135] firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback Date: Tue, 10 Aug 2021 19:29:50 +0200 Message-Id: <20210810172957.592508718@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@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 @@ -535,8 +535,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;