Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4523943rwe; Tue, 30 Aug 2022 11:39:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR7IPODIsIfTMAdQpygpkFiZuYtyS29RDbf3clEW+mFyRj0nADer5MPzqnlKPOOXs1m3W3WG X-Received: by 2002:a17:907:b15:b0:741:8ae4:f79d with SMTP id h21-20020a1709070b1500b007418ae4f79dmr7897408ejl.247.1661884787009; Tue, 30 Aug 2022 11:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661884786; cv=none; d=google.com; s=arc-20160816; b=0llk/1qIMe3f30meNaD++oXs3GRE+GReCV4R+jdfVYcuQ/jfrn2hm86t4uJ8PH9b55 IAyMbjuRAsruijSoIBLHX2hVtxwdPdzo5rOx3shPJHULoJ1aDANZW7oOVM61kirXje+G cEbll4y65/ZxW6DLAWvu2q4iDLqzvLOvcd0+dKuxs1BxJ2WvskkYElUswuiF9KPkPvLW Q5Zf6vlHGJEUZXRHxXoifYWWCR5+EP2/ZjEBBVdGpcFFlrypZ+XjpAac96ikiJXv39KW epNof/d7jyBhP1kpHPfp6QvvJ9BMfXm9RKU1QDftBuCH10eL0AVqHqlbRh9EqtCyrFKE X7HQ== 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=2DbPP9r8HZEKFG94EtgZQM3s+xxlxQpRBuorR3jC1Bg=; b=OHThRA0KTDAZx/FwGED255g6fBDVMdknN5a7tm/RsR9mERPv6fRKviVCKu3Fimm4IK u5krgUf6NC94Ia2mV2Yo+IoFBRWqRIdflgBukTZCyO9xbRA8j2sBxuho6mPyqo3YbnZd po8cf9T/SI/Wo9gjN5jTcPlIFU4B35fz9Q8FLphY5OQzyBQlxpox2MsqYfEzPqIuOfho X2B0ooKs9RQnNNRvCOxqXmpQeLbXU6iBojeqONrQLjPL5ynVz9PORFM+EJS4T8cNT4gB BeBCdTQRjuJiM+n1+RPYHJS/bo1rVeeN4mC5LC3+CwYALwSDpg1+eR/3T5wCSG94uxaJ IOow== 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 j11-20020a05640211cb00b00447726f8e2asi10774503edw.48.2022.08.30.11.39.21; Tue, 30 Aug 2022 11:39:46 -0700 (PDT) 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 S231269AbiH3Sdp (ORCPT + 99 others); Tue, 30 Aug 2022 14:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbiH3Sdl (ORCPT ); Tue, 30 Aug 2022 14:33:41 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA9D66D9D8; Tue, 30 Aug 2022 11:33:40 -0700 (PDT) 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.0.0) id a096b024c41563cb; Tue, 30 Aug 2022 20:33:39 +0200 Received: from kreacher.localnet (unknown [213.134.183.102]) (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 80DB166D27D; Tue, 30 Aug 2022 20:33:38 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Srinivas Pandruvada , Zhang Rui , Chun-Yi Lee Subject: [PATCH] thermal: int340x_thermal: Consolidate priv->data_vault checks Date: Tue, 30 Aug 2022 20:33:37 +0200 Message-ID: <4786350.31r3eYUQgx@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.183.102 X-CLIENT-HOSTNAME: 213.134.183.102 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekfedguddvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeffffffkefgheehffelteeiveeffeevhfelteejvddvieejjeelvdeiheeuveeuffenucfkphepvddufedrudefgedrudekfedruddtvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeefrddutddvpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgt ohhmpdhrtghpthhtohepjhhovgihlhhirdhkvghrnhgvlhesghhmrghilhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 It is sufficient to check priv->data_vault once in the error code path of int3400_thermal_probe(), so do that. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Index: linux-pm/drivers/thermal/intel/int340x_thermal/int3400_thermal.c =================================================================== --- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ linux-pm/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -614,9 +614,8 @@ static int int3400_thermal_probe(struct free_sysfs: cleanup_odvp(priv); - if (priv->data_vault) { - if (!ZERO_OR_NULL_PTR(priv->data_vault)) - sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group); + if (!ZERO_OR_NULL_PTR(priv->data_vault)) { + sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group); kfree(priv->data_vault); } free_uuid: