From nobody Mon Jun 8 06:35:48 2026 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADCDE2D7DD4 for ; Wed, 3 Jun 2026 01:22:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780449769; cv=none; b=YJ/NIXhNry99bdX+j8v5cZxlye+ATxxfcdTHG/O7ml6XptuZE9f4jWJp94gUX00oeZL/MRFt9AAMWO/N5m+2KxHL/kJ+A2Agry6ZqUe1eynhzzd3WfIij8Yv4+Xnnh+98cTtFIGaHlqlRDeRyDhrAhe82jSlz+mPeeG1CizirZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780449769; c=relaxed/simple; bh=h7L4x60VoXKI+S2ob5PXQMLGKa7u411Cq0iZXT4ZVWQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pPE0T5Hv23huyG4IyoSDY7EEcaZHpKJ/Ed9Y/d4Ad8p9liWlxMepxLb6UDDPJW6GI/FcviSwVxcdENvv//XYlxb7EpPIlqz7qosTuBVDqrp65XduqApumzmHUEIw6wxxy65ZVevmpqyGZ7v4k39vi1+uEN+GsF3KOw4yKh5aFi4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=keh9PGfv; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="keh9PGfv" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780449764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=J0pOcGvjBj0/mBPqfeGUT3n0kRlW13ILzi7nWbOxTts=; b=keh9PGfvzPI08fCAxDeYxF4zz5RQwsmotS15QfzLJyxyU45i6vkZoYLasvHzsE9DFTM+SK rWhmEp8EXDGHeAoame5huSc61nzPvJDmisevmdxvKFqvG/FKu5NuYjBuByOZX6r21/KATY JLsI2LTBvOHNTtH9ouoTxNbXb9c986Q= From: Jackie Liu To: brett.creeley@amd.com, dave.jiang@intel.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] fwctl/pds: propagate actual error code instead of hardcoded -ENOMEM Date: Wed, 3 Jun 2026 09:22:19 +0800 Message-ID: <20260603012219.90498-1-liu.yun@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Jackie Liu When pdsfc_get_operations() fails in pdsfc_validate_rpc(), the function hardcodes the return value to -ENOMEM regardless of the actual failure. pdsfc_get_operations() can return various errors from the adminq command (e.g. -ETIMEDOUT, -EIO, -ENODEV) or from DMA mapping failure (-ENOMEM). Propagate the actual error via PTR_ERR(operations) so userspace and debugging tools see the correct failure reason. Fixes: 92c66ee829b9 ("pds_fwctl: add rpc and query support") Signed-off-by: Jackie Liu Reviewed-by: Brett Creeley Reviewed-by: Dave Jiang --- drivers/fwctl/pds/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c index 68fe254dd10a..a4e80cfa3c50 100644 --- a/drivers/fwctl/pds/main.c +++ b/drivers/fwctl/pds/main.c @@ -325,7 +325,7 @@ static int pdsfc_validate_rpc(struct pdsfc_dev *pdsfc, rpc->in.ep); if (IS_ERR(operations)) { mutex_unlock(&ep_info->lock); - return -ENOMEM; + return PTR_ERR(operations); } ep_info->operations =3D operations; } --=20 2.54.0