Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3761419pxt; Tue, 10 Aug 2021 10:42:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOmzYMDqhW7gLACJqIeB9irF5X1gF7VO1BCOVstPbJlceVXhNrM6OBfB0dZErHTW+6NJVa X-Received: by 2002:a17:906:cb11:: with SMTP id lk17mr15330280ejb.271.1628617347732; Tue, 10 Aug 2021 10:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617347; cv=none; d=google.com; s=arc-20160816; b=yNnLXylOB2VuPjtNNMhd8P9nxC464RfiPAbAHDSw/c8UGqqeqpGY2CsTRh9bp1cW+H NeL8RueojOFiI1IrVNT+RcwjAAoLeDgrIpxg+omdmD5rC05z2v8yo96FipEoht+hJSan /Zuncl0Dpn52nV5e15n30/hqzSjSD0TSdfRSorU/chic+6j4vw8WwpbHz5mi1N4n/JiQ W7hLXh8+/ZgCnp8Chew3D4m7v5uzRlP+4eMO6pgA1d8sIMMuH0djCbhQzEhGtAsXpyCu kdIb/vSSU9OFPaOMTzetH9sYVrZvcbjFwom4GE//mubLiP8V3XrTXL1rTm/I7fCJhT+b yRuw== 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=IixEV8N3EzwYqTThbnOC3T1BYzXcsctQGWUkAWM/Q+E=; b=tLBfCt5R4EPpZMwadnb2f0j7pW/MVmNcezKl6efURpZ0Rj3UFX7i4Lsh32gIF+Z3oN KKxl/LmNX/UbPiAXsSFHR6gPCU54rzdEmYhcTArDyeTCMDQ48PV7faUaq7hNzZ8Ay5zh 3t+SjBsNfh7uG3yaN18s5cEpL90wLKh4A9cuqL7OHBvd8FkafgeptDrd6s4wJacMcmCf LwQDMvYOE09Oa/+GJZ/rlEE74esmyVXHNbVq/fRd0HRk+lSog9f7+kl8zH0mTMxP00g3 +/WJBQUft1Kxhg0zvuUQTJ1pl9Su9SHuB/OVkAotbBLTfZtA0Ng/dGGOdTnCmBteDtcy VxGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0FaElziz; 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 w16si24520434edl.245.2021.08.10.10.42.03; Tue, 10 Aug 2021 10:42:27 -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=0FaElziz; 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 S232412AbhHJRhF (ORCPT + 99 others); Tue, 10 Aug 2021 13:37:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:39322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232803AbhHJRfT (ORCPT ); Tue, 10 Aug 2021 13:35:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C6C6C60F94; Tue, 10 Aug 2021 17:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616897; bh=jVggrLsUZFS7UY5poXCnjYHAW+0AunxQpHwxXsK0rnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0FaElzizykUuq/hF048aI4PbYpMIwBb+6CCSukl+QcFoQRhKkf9Cb3d/zhtGAerPj ho1DAz1Yf3ZjjLFzJN6iujRCnGV47qNaiAcy+Ikj3M9biI76z8wrO/cWEI4o/V8ptz nGVWsJCH9qChtbmYhx23zRgN6l2opIsfT8f8PX0c= 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.4 40/85] firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback Date: Tue, 10 Aug 2021 19:30:13 +0200 Message-Id: <20210810172949.573291047@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@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 @@ -534,8 +534,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;