Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp149828rdb; Fri, 5 Jan 2024 05:48:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFipDqXiS4kjX9xp6rJdL0uPCGHZCP2rC9GVXmfWReRvfWuuUyW0dD0X9VAeSPKjXKPMFJ4 X-Received: by 2002:a05:622a:11cc:b0:429:73e8:590c with SMTP id n12-20020a05622a11cc00b0042973e8590cmr1856139qtk.59.1704462493151; Fri, 05 Jan 2024 05:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704462493; cv=none; d=google.com; s=arc-20160816; b=ClCDmyvnDNb4wpGKsAH2q9plaJrRO7zlimvLNDCTWyfzUjeVlG/2K3JC5a4C3sFLCA aVu4zzo4bsfYLPmuYSiCnbaVuzFNMXMP4QKHjKgQfVUmGBeju19mHYmmI8WDOiG+dQgl 1irucBSTV9oBTsdfLL8huVYtgRj/Nl1riN8A0Xh05NNwpr1+wx7+7bHbvDZgpO7Qxlba zQX6JV4dY/U4GdRtp6LbvPZTLnjfrIopSKQdNpgwLBJYo1BAkh0bzAx7fIX0NajNe7kJ aTvmmQDIHSitH7g5y+01zXMMtPnDp0HFl3Xl8s3OqGSQOHQu9qjTddMYs0davtVZUckm 4uTw== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s31-20020a05622a1a9f00b0042780ad8479si1771936qtc.402.2024.01.05.05.48.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 05:48:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17892-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17892-linux.lists.archive=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 E3E9E1C21DB3 for ; Fri, 5 Jan 2024 13:48:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EC232D7AB; Fri, 5 Jan 2024 13:48:03 +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 ; 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 ; 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 To: Armin Wolf Cc: Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , 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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding 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 --- 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"); -- 2.42.0