Message ID | 9c81251b-bc87-4ca3-bb86-843dc85e5145@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-17892-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6228868dyb; Fri, 5 Jan 2024 05:48:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGuduraflks9r6b6kV+a3uhBKlajSuqVW/FHYStFbyAo1JObIamaEphLMQWIXIqMFedp8KZ X-Received: by 2002:a05:6808:23cd:b0:3bc:3c29:2b5 with SMTP id bq13-20020a05680823cd00b003bc3c2902b5mr173962oib.91.1704462501809; Fri, 05 Jan 2024 05:48:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704462501; cv=none; d=google.com; s=arc-20160816; b=vRglN+sPCaMgNdCWIMe5ls4VqOTlzyxX8UUgmr7djBt+YZSnAoMMc5c9c8O94NsXbH /6Im57L9zWhldNJunepbXhfkg8tsOYmZAC0O21QbOKVxDLfOtEAU3teNU2mOQdEEk/Qp FDuP337Ms7ucq7LDE1s0jKm8GkxJ7NM/lMadaHrpPvYWDx/GpkndA4KLPhFZ8IIMmgGN wByzGTM3JuWV8uuB1CJkHxqkr7Q/coReGjml1q6J2xa687emBuWyyjgbTuSqFTv5z8f/ VLXKiJ4rE1khZVWVPGNyyFb0HyklXVLkjnHJfylYOEg0MNfrTlQDnV3IjHHQKARsFu9Q snhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=S7scXJfb8MpiekK69yzw2lN/iDE5LBn7Yp5Zuvf3udM=; fh=C+8GMgifBVOlIsKmdn9JNctBrLkCRyQjN8NrpuBBLdE=; b=tMnSA0bJbVNzJheNHhf86XxNrQGoD0YR1bDBw+cGAhrXDLBiiV3GQpzzHHFY8DKSbW ECtTKFONp2NMdLvUxVsv8vPo5n6RiS1Dexso+zaCVVF7F+OfkBGGvKpPv7pZpZosIcSo 0fCUFHe7bgtpbxx6Leq/tDo3UxLDIRvAIiLUM7e37l19veT7w+o+roSTqyODUFNO2S1m odxYWxHE//fOyFvmU2F90kdkPS2T2bci0sA+jLs3TWm4BNT4qxY7OAzYF6nL7jkWaQme T9qCi6EHJBO2Nz0AjKSkw+0nBf3HoZW1NEngMqKQMlNAoshrYkocZbU9xweq9zqfMUm+ 4iJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="clUa/AGF"; spf=pass (google.com: domain of linux-kernel+bounces-17892-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17892-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z15-20020a0cf24f000000b0067f839c30cdsi1789665qvl.336.2024.01.05.05.48.21 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 05:48:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17892-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="clUa/AGF"; spf=pass (google.com: domain of linux-kernel+bounces-17892-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17892-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 953D01C228B9 for <ouuuleilei@gmail.com>; Fri, 5 Jan 2024 13:48:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A9742DF7E; Fri, 5 Jan 2024 13:48:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="clUa/AGF" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2DFA2DF68 for <linux-kernel@vger.kernel.org>; Fri, 5 Jan 2024 13:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-40e353c8d75so13435105e9.3 for <linux-kernel@vger.kernel.org>; Fri, 05 Jan 2024 05:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704462478; x=1705067278; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=S7scXJfb8MpiekK69yzw2lN/iDE5LBn7Yp5Zuvf3udM=; b=clUa/AGFNlZ/QHvPZ6clLbGk6C7reNyAc70KJev9NiVfp/cMRUhU0sQb05osr7QSpH lratOl0cobqIeaPBBk1OA00BMhSacig52R9IPYAHVcSgZO1KSedlc3sDdMQObueU1Fr2 5Z4h47ycVQaL1awGfzkzYwNyG3JeM0Bt8u00350pI9Zb/YN3Mw7qN5F3cZjBNmznThHb TwNctx9VwF063hAMC0DMovh3YcIOoBu37nKbA24iVwTyDT+HXdzdYXs3RAhx7glNdLuu 8Q5FASUV6/OG5xvjPI5M1Be37TLa1g3OwIFMUs9V9djgzhSt148WZ2cQuk+g3KUXgwxH QaVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704462478; x=1705067278; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S7scXJfb8MpiekK69yzw2lN/iDE5LBn7Yp5Zuvf3udM=; b=ilzCO2UbEQBKIH3eFPTNIogj/8KLrHwTqNom56twZ8rRXzlYZhCcFWSEXdqw9sg7Cc yVe7W4w+91y7ObtRFcQE+z4sXYEFfZIHA1HpqyyQOoy4aqvKqFyWZW2VDN08wrZisXye UwNwTYf0EEG6hGeHMd6ZI+bLAAKc4eu6T3k7ka8lTMzuWrCxeqgX1GZG+bBmYpMqbNN6 Zwi7h0Q508bvz+c/o3BghiSGxXfOqbyyYJLnGCjTeKI+/6ne3Ahhpgwuel343drZRPm4 e7EgfK55OaKZHovL5+3dgBdR8VoWGF2fM4IDmmOncd0Skc45Eg10mBTzks9I0HT72wzZ jAcA== X-Gm-Message-State: AOJu0Yw/surNiK5aXM2q0c+/y3mPXbeP8H5c5yDbQUzB7TibWJfB644l dFAjisFdMjHBD/8TPVPqtojbKgBIiZaD2g== X-Received: by 2002:a05:600c:3b8a:b0:40c:6d5f:e88b with SMTP id n10-20020a05600c3b8a00b0040c6d5fe88bmr1212246wms.112.1704462478113; Fri, 05 Jan 2024 05:47:58 -0800 (PST) Received: from localhost ([102.140.209.237]) by smtp.gmail.com with ESMTPSA id o13-20020a05600c4fcd00b0040d3276ba19sm1631292wmq.25.2024.01.05.05.47.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 05:47:57 -0800 (PST) Date: Fri, 5 Jan 2024 16:47:54 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Armin Wolf <W_Armin@gmx.de> Cc: Hans de Goede <hdegoede@redhat.com>, Ilpo =?iso-8859-1?q?J=E4rvinen?= <ilpo.jarvinen@linux.intel.com>, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] platform/x86: wmi: Fix wmi_dev_probe() Message-ID: <9c81251b-bc87-4ca3-bb86-843dc85e5145@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787258472003819236 X-GMAIL-MSGID: 1787258472003819236 |
Series |
platform/x86: wmi: Fix wmi_dev_probe()
|
|
Commit Message
Dan Carpenter
Jan. 5, 2024, 1:47 p.m. UTC
This has a reversed if statement so it accidentally disables the wmi
method before returning.
Fixes: 704af3a40747 ("platform/x86: wmi: Remove chardev interface")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/platform/x86/wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi, On 1/5/24 14:47, Dan Carpenter wrote: > This has a reversed if statement so it accidentally disables the wmi > method before returning. > > Fixes: 704af3a40747 ("platform/x86: wmi: Remove chardev interface") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. I will include this patch in my next fixes pull-req to Linus for the current kernel development cycle. Regards, Hans > --- > drivers/platform/x86/wmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c > index 157f1ce8ac0a..e6f6fa2fd080 100644 > --- a/drivers/platform/x86/wmi.c > +++ b/drivers/platform/x86/wmi.c > @@ -868,7 +868,7 @@ static int wmi_dev_probe(struct device *dev) > if (wdriver->probe) { > ret = wdriver->probe(dev_to_wdev(dev), > find_guid_context(wblock, wdriver)); > - if (!ret) { > + if (ret) { > if (ACPI_FAILURE(wmi_method_enable(wblock, false))) > dev_warn(dev, "Failed to disable device\n"); >
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 157f1ce8ac0a..e6f6fa2fd080 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -868,7 +868,7 @@ static int wmi_dev_probe(struct device *dev) if (wdriver->probe) { ret = wdriver->probe(dev_to_wdev(dev), find_guid_context(wblock, wdriver)); - if (!ret) { + if (ret) { if (ACPI_FAILURE(wmi_method_enable(wblock, false))) dev_warn(dev, "Failed to disable device\n");