Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1972758pxb; Thu, 4 Nov 2021 11:42:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBYifdrXy2BpWDMCDSjjWvZF4ydMhT1+ztVxbwZ7pWeCGxyGkqSuI6ish8KutFtJclq+2j X-Received: by 2002:a17:907:8692:: with SMTP id qa18mr9403447ejc.7.1636051338556; Thu, 04 Nov 2021 11:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636051338; cv=none; d=google.com; s=arc-20160816; b=Kk2CQNu6D10hvnnkq0T1GjFlLpuQLsYIZ0UXe68ovPlY+5FO//x9YVF+2ieqhob8FG kbO1l+Hsn/vtQz8/95nC7zNtbMq6cdflh+sd1PNVGXj0EyOutwzAGRCE12SQMu1y3Axx uJ97jmTQjDuyda0ayEeX0nx1cupFpJK6S3uscaSGoTuOVDmbm4qICMRbp0EX8nkyA+ON OlHJscfl1WwosyCE+2Pmco3nLBYlKhYB47fLlZySuxjuF4kktoEbsqzjBpSjmKbwIang gmf8xJi/RkzUV/9qfJAzj0Goo/vV11niS2OtC5aQqdiErqGghLfzIrR33QqUvBFP2eiy ctEQ== 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 :message-id:date:subject:cc:to:from; bh=4rXb8QIJI9N0ivMuPZwIuyZLB00v39sVYJN4RkRsDDg=; b=xJAq//RfMV5OK+qWYRWeOSKnreFO2Ru0jW0Fz1pFe2SpqpygUdMvfArwtY3xiUPy9w PS4EORgPr77A48Owamn7libtJgui7d/G+/1v+BOYxaNNS2SWQZlXreK/xQqs2vLCnTl7 7Eyci9zKQtUGgRDXofHvVGiGfFO8IsJKn7CAzZKftfEFNyR8d3T8p+m5KBdz9ZoHZfk1 h0gFkDUMX/PQKX4GY2M03kU+DEMUrruCKqwhsIVdkUcp7aJoFu6d0Qee8HHQacr56J9I I4o1rYySesySFZhz4bqBNQlsicnOsnElqREzT9MuEC2xPweMCbKF/wfrK4dzdJRSvOvU ewLw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e11si14047580edz.274.2021.11.04.11.41.37; Thu, 04 Nov 2021 11:42:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233295AbhKDR0i (ORCPT + 99 others); Thu, 4 Nov 2021 13:26:38 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:60706 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234276AbhKDRYc (ORCPT ); Thu, 4 Nov 2021 13:24:32 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 3.0.0) id a4a503332dc94e4d; Thu, 4 Nov 2021 18:21:52 +0100 Received: from kreacher.localnet (unknown [213.134.162.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 16AEB663097; Thu, 4 Nov 2021 18:21:52 +0100 (CET) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , "Rafael J. Wysocki" Subject: [PATCH] ACPI: PM: Fix device wakeup power reference counting error Date: Thu, 04 Nov 2021 18:21:51 +0100 Message-ID: <2606454.mvXUDI8C0e@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.162.27 X-CLIENT-HOSTNAME: 213.134.162.27 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvuddrtdeggdelgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhephfegtdffjeehkeegleejveevtdeugfffieeijeduuddtkefgjedvheeujeejtedvnecukfhppedvudefrddufeegrdduiedvrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduiedvrddvjedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrrghfrggvlheskhgvrhhnvghlrdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Fix a device wakeup power reference counting error introduced by commit a2d7b2e004af ("ACPI: PM: Fix sharing of wakeup power resources"). Fixes: a2d7b2e004af ("ACPI: PM: Fix sharing of wakeup power resources") Signed-off-by: Rafael J. Wysocki --- drivers/acpi/power.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Index: linux-pm/drivers/acpi/power.c =================================================================== --- linux-pm.orig/drivers/acpi/power.c +++ linux-pm/drivers/acpi/power.c @@ -757,10 +757,8 @@ int acpi_disable_wakeup_device_power(str mutex_lock(&acpi_device_lock); - if (dev->wakeup.prepare_count > 1) { + if (dev->wakeup.prepare_count >= 1) dev->wakeup.prepare_count--; - goto out; - } /* Do nothing if wakeup power has not been enabled for this device. */ if (!dev->wakeup.prepare_count)