Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6367617rwb; Mon, 5 Dec 2022 11:15:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6dr9MElYt2O+yDmD3wXJZuLo75hITLFoRRbMJV7wR/nW1qDbwLRc5uwLAm1BXH4x2VpLSE X-Received: by 2002:a17:906:ee1:b0:78a:efde:b84a with SMTP id x1-20020a1709060ee100b0078aefdeb84amr70639988eji.744.1670267754082; Mon, 05 Dec 2022 11:15:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670267754; cv=none; d=google.com; s=arc-20160816; b=IpdGAUQQ9gmQD0FfAlBrUENUMAchtDpQagdLZG2zoVzbxxss4bhdExDsQnH1603dMC dwcTg4WoEsNiDEshuYyVwqkSSJX1zBPM6py30az+LIUjDGq7Rilb8gOpkNA4rlg8JrOU nikClLxRe9ASlXNYlE6eZojXvi1xYWXOib6TYxas+jpaspO5e2f5njSltdLhx8CwVGxd Krfn1XEeZ2hNEQmZDGvxwIOoyxEztl4qJcymVPzSV9D2EoT3yVw/LSDSgceRDG2tXu99 DMBZ/z2GckOuEPhozFHpSRg7LRrrwY+j5gUwAWohPjG7SqHEy7qN+xj/HmmPq3707Ifc YTYg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bEJCn5Q8WyoSCRrq8iVtHIAjn2dTwPi8pAtiTJbNvHI=; b=hHIjr34e/MUUw3PqviERzMYr5/7wjYw6W/gnXkWGxXnIyjRRZEAeyNbY991596O91J s6nYopx9lpAVuOl6JAgXwMDHgjWqOp57/eecfMy8L+5FUxY5l49Hx3c8r4O9fWa5cd05 ikGIgChvqCgLApRfdhj6j4BJqKoexMI+2InROLlmp5HwQ5KI8L3SvBJPBdmwvAU59hcS /c0Fz61hmgvCGBAAcxMaPuMctIAoWLu/uR57NUu2didXxxt+OKshOUNNdOqDWN3BrhVw 7JJfVwhqDakkbYtJV0qLscwAVzU2l2IuS23T1Hi3jlvT8yyavGhf0Ts24wOsdMZow1i+ Xb4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xf11-20020a17090731cb00b00792e39c31dcsi12342303ejb.988.2022.12.05.11.15.35; Mon, 05 Dec 2022 11:15:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232031AbiLETId (ORCPT + 80 others); Mon, 5 Dec 2022 14:08:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbiLETIT (ORCPT ); Mon, 5 Dec 2022 14:08:19 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4588DF5B; Mon, 5 Dec 2022 11:08:17 -0800 (PST) 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 5.1.0) id 3df8c0bb3010c900; Mon, 5 Dec 2022 20:08:16 +0100 Received: from kreacher.localnet (unknown [213.134.188.181]) (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 8420A2801EA0; Mon, 5 Dec 2022 20:08:15 +0100 (CET) Authentication-Results: v370.home.net.pl; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: v370.home.net.pl; spf=fail smtp.mailfrom=rjwysocki.net From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Zhang Rui , Srinivas Pandruvada Subject: [PATCH v1 3/5] ACPI: processor: perflib: Rearrange unregistration routine Date: Mon, 05 Dec 2022 20:05:55 +0100 Message-ID: <8150213.T7Z3S40VBb@kreacher> In-Reply-To: <1836012.tdWV9SEqCh@kreacher> References: <1836012.tdWV9SEqCh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.188.181 X-CLIENT-HOSTNAME: 213.134.188.181 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppedvudefrddufeegrddukeekrddukedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekkedrudekuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthht ohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Rearrange acpi_processor_unregister_performance() to follow a more common error handling pattern and drop a redundant "return" statement from the end of it. No expected functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_perflib.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) Index: linux-pm/drivers/acpi/processor_perflib.c =================================================================== --- linux-pm.orig/drivers/acpi/processor_perflib.c +++ linux-pm/drivers/acpi/processor_perflib.c @@ -754,18 +754,15 @@ void acpi_processor_unregister_performan mutex_lock(&performance_mutex); pr = per_cpu(processors, cpu); - if (!pr) { - mutex_unlock(&performance_mutex); - return; - } + if (!pr) + goto unlock; if (pr->performance) kfree(pr->performance->states); pr->performance = NULL; +unlock: mutex_unlock(&performance_mutex); - - return; } EXPORT_SYMBOL(acpi_processor_unregister_performance);