Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp621082lqp; Wed, 22 May 2024 14:37:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuZCwLZGI1MPet3X8e2N+gcqCR2oQFKuhrTFi8EtGkLjAAbiYu0AKemta5mbw90ir78o+gD7U9AFiDPM7Y2Vut8m634Q6rZUgdIC0e2g== X-Google-Smtp-Source: AGHT+IGOM2qCNBAf6rvMDj6JnSOzZ1KzZkMfLaD1gKNzKVOaDR6TTJozR09fbF3FVyqbcgrQzQI9 X-Received: by 2002:a17:906:2da2:b0:a59:cb09:41d6 with SMTP id a640c23a62f3a-a62281cab6bmr186044766b.49.1716413841328; Wed, 22 May 2024 14:37:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716413841; cv=pass; d=google.com; s=arc-20160816; b=ayq/jYD/8V94dhHRsoNWJQNbRLKVdscaBcqSHGcrrPlWd8WLH71Mqa1UzpCVTg7O3f O1qUB7uQdpXT4mCBCJesC2zUnHSD1mItKrv8nv44vKMPAPq7+j1dW0eftheRNreqL+7m idzRyKJZrQz9GORIYYaLKlTNDarCcXaj9ChQvkX3t5AaTL8voz04n//i6nmSCs1N5F9s ztlE7bq/n8Mc9+3YJJSVjvHorOFrI0O6vtm1OOPeX6RBm+qwR9MEmSp5QORgKkfzvD8J gepOlN5chfydb69WgBAX9np0iLTmXMAK1jsUPJ0dYYIi95rjYSjlPGZA7nA9u/5vRNEn Bm4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=2D8nAm4MctRuFF1pGWD5+lc7xhTXQPBA8z6v1wGk//c=; fh=tnRAMqcWiXBrXMdf47l0fYwJmOj4zkpNbORAiH1LJoI=; b=rqZMTRyZG5XtmzhDG7VGV+c/+Na7YqkRvXHuOsjfICF7wgb63OEtTzvN/MDCS6SCdD R4AiDgVyeyPVjXwS4uQmNjtAEBSdxozqc7n1vCdHzGWFie3S2xZ3ANXJp/7K+JdMj5sq SR9q++jlJmVCdC82/tKOXslMulIl8vvCAzqr7SXyiOIJfAJmxrbUgNAzTRa69UH+HQ5g p6A6k8+kQ/sw1oFIUrKrYY53fVu09rlL+clQhI1jfh2GEizCPilTWUqYyMiVShsejJLa wUQAAgg67UhGioZaLvrbM/DKB8uZKQF4Rb8QqPdF8V53kdSGJrbYojF7dtZVqGi/HWfC xHfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=cstvXarK; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-186739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a5fdc9b21si1211114866b.181.2024.05.22.14.37.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 14:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=cstvXarK; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-186739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 179781F222E3 for ; Wed, 22 May 2024 21:37:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C520146D53; Wed, 22 May 2024 21:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="cstvXarK" Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 C1FFD7FBCF; Wed, 22 May 2024 21:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716413823; cv=none; b=jDD3j+zre+cWQJlFPWPe4FQoFSoVmCWbuYaMB0cw8PZh99j1L61FV3Bic2huuGnEG3t8cXiiZwqpfopJxQ13VmlwJhv42msBexAIC1ux5n7/zvsyNTaboDfHz2Due8q+/NSLVliNsg0sd2clc2vH1XPAcHrAuHxpFt7hMb1tUXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716413823; c=relaxed/simple; bh=+aI/IRjah/lsTblI2//u7vmxvM6d/MYv/JtHH8kkYvU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ouN9okYpFx+4F6IKUa3PXNtkTHfdcw2kr2Jc4VFnL4HWxqMkGPGCQhc77tzWHCDknLJ5wB8XpncKwbSMUtNq8+H0faRXGIBCB7IpmIcyVAHO0Mf/Nq3cxSPtrChQPKa/7wT4zk4is5CcoJv5vKkF817tzHFEDycT8V9drn/iDpw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=cstvXarK; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1716413815; x=1717018615; i=w_armin@gmx.de; bh=2D8nAm4MctRuFF1pGWD5+lc7xhTXQPBA8z6v1wGk//c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=cstvXarKTVlJPquh8eOTr/XZCVDVA97gOjpAmwi6EJgDakeIVSfuvKnHvLNx98oW 8OO3FPYYv2ihkLyvG4Jt2e86x1kGc6zuHPuMzZ2lTHh6r8TxJt2XPK8Te/nMXl0rn nWPD3RFxbz6ecrO6atwCrLrNpDaVG/Q+b4+3o6mQ+vIJbXlSz5pjYLqURAToDvbm6 EWUo6/njgl2s9tdy/1kWpHWabMUtCVAKZ2Y/yev6E07mdKgF4NGCNiPKWRJiNsPtw mnjfYUZ5IKVvE7wKYroXiikRjC2DQ+M8vdX4Uq5T2w1r5cEv+QQRx1iWwNtoEMTjO uAWodBGLJK71jck/1A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4axq-1s8FDF2XAc-0034QO; Wed, 22 May 2024 23:36:55 +0200 From: Armin Wolf To: rafael@kernel.org, lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ACPI: EC: Avoid returning AE_OK upon unknown error Date: Wed, 22 May 2024 23:36:49 +0200 Message-Id: <20240522213649.2860-2-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240522213649.2860-1-W_Armin@gmx.de> References: <20240522213649.2860-1-W_Armin@gmx.de> 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-Provags-ID: V03:K1:oS/SFcZwqPRcZmsAO7DxxSBH3yt6wc74l/TbPeiaibL7fPURIn/ ACDwX0Wvug8VXeNOxHuSBh1rEEdW7ZnPjjSwck4NBn+mROV47gjN/XDbjLhVFQfhjZ1rU34 AxAbG3qw3krjUa2rgtFIJVSy6FE88XU3J1kcKj/nBOtGnpiEwBn+OLw9TaxVFQKoRhxRiDo fz5f+6jPh6to1+LLYWx0w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:uoA38NJva0I=;uO5++yFAdl61e8qKV386s3mNyA5 gNpU0FHkt+//OyPa6y+x9ONAPQCYduKSHwbc0LJtB9QslJZj96e7OzI4u839YMkgIEfwHvINu UQfqPNHpkxthwDvhrDW+QfPrU5f7FA6hU3rCERHTnTO2qj7DMcFk+tIOYcViUjDj+rdKVG0+6 qv3+KkDtte7XNU8CUsrc0nMQejf6NOdIZ9j22BaWKF+s5byuTtR9hzdcMjtRg4tBBpRli4TjB w+YE8Hvkaxch+IwHmJUi5swRFXNo6FdtqLITjCr0rruZtw4IMtJ2aILnUGAUpv12nnHnjh+V/ HBAONo0xTQnryXeBXNEku9+X/IGzGk2T69OfhhtPDAhs/w6PLTK135OgHG9ARQhTPE70+1op6 MazIhprkZ15TUJ5ymix0EbWhRESL70l/2sziuDV3E1tH68SFjsJOc4dJvx8YNQtrMmP4qYdHZ qsPvCIz5xOiM8C3qgbn1uJpQtHjKnFleM29/ylLdsBFthNBsX0AWL7aPfo4RQ4ZY+t3Mdfu+E oLhmdaJFpehOW5hdRRrF/Q4tQkzUM0g9hJNSLVAgb/2r1vuKPh106eihBNt6r4PuanrHuD4S4 EX+Ee4cttQFtc4i7OkYtKCJAbH/SUUbIIWEXefQhQNwe78e3VfBmBEXzWm/BBTO916SbSuBZz J2M+ZyOyLDx2txkn+r/5KSOy9azA+tyjiaZc1/EfTsSq1AIEOWNzBOgobYixGC0CsPIOS/QjK W067iA2O2gc+0kuBfwZxTlfOu6ktVpbXwUGxpgCwXjRs+cTM+AUvXD7nFqM/M7UWY5CBcXkTx vI7Gw6lh5cZmDtXhP2NpceYutCArLchIDIgYpeimL5Zck= If an error code other than EINVAL, ENODEV or ETIME is returned by acpi_ec_read()/acpi_ec_write(), then AE_OK is wrongly returned. Fix this by only returning AE_OK if the return code is 0, and return AE_ERROR otherwise. Signed-off-by: Armin Wolf =2D-- drivers/acpi/ec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index a68dce2147a4..68dd17f96f63 100644 =2D-- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1351,8 +1351,10 @@ acpi_ec_space_handler(u32 function, acpi_physical_a= ddress address, return AE_NOT_FOUND; case -ETIME: return AE_TIME; - default: + case 0: return AE_OK; + default: + return AE_ERROR; } } =2D- 2.39.2