From patchwork Sun Aug 13 02:52:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Rui X-Patchwork-Id: 13351984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE3B2C001B0 for ; Sun, 13 Aug 2023 02:52:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjHMCwe (ORCPT ); Sat, 12 Aug 2023 22:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjHMCwe (ORCPT ); Sat, 12 Aug 2023 22:52:34 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BFE9170A; Sat, 12 Aug 2023 19:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691895155; x=1723431155; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ayErGxhRHllzcsmwaeQTU9qCRuFG7WI+4RAgT9UUgu8=; b=fUODolnNdp2RRSymIvAVwGyAwYod0K7UOjKK4k4pLziCd6vliRl1EveH vMZX7SfNKmErGSRW3RYSMLhBS/sgbV1KN0wWHEhHELICxKGJNlM+c8luy I9KFUTYReutIEF1scPt4+NQfcu9zuBOppXC8QYJJpQ3aBQg/1OZeVbB+X /NF+4USC6x5AOZU68g+QIn+dtWlEfQW17DPIdRTTEOiWj+B+KXzIu4X8d z0V+wOuqs6EWFebNm4qzzEhrPCGtsabT932gtJ5ggSaHtCa6zXYcVY7Gd GVtkTBsmFiXBVhw/XvjXFN7f9izf3ZwfJSCKEk/jRjCpsXb9Fut0LjWkT Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10800"; a="356823901" X-IronPort-AV: E=Sophos;i="6.01,169,1684825200"; d="scan'208";a="356823901" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2023 19:52:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10800"; a="762570867" X-IronPort-AV: E=Sophos;i="6.01,169,1684825200"; d="scan'208";a="762570867" Received: from yingyuel-mobl.ccr.corp.intel.com (HELO rzhang1-mobl7.ccr.corp.intel.com) ([10.255.29.168]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2023 19:52:32 -0700 From: Zhang Rui To: rafael.j.wysocki@intel.com Cc: daniel.lezcano@linaro.or, srinivas.pandruvada@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH V2] thermal: intel: intel_soc_dts_iosf: Remove redundant check Date: Sun, 13 Aug 2023 10:52:20 +0800 Message-Id: <20230813025220.1752489-1-rui.zhang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Remove the redundant check in remove_dts_thermal_zone() because all of its existing callers pass a valid pointer as the argument. Signed-off-by: Zhang Rui --- drivers/thermal/intel/intel_soc_dts_iosf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c b/drivers/thermal/intel/intel_soc_dts_iosf.c index db97499f4f0a..22fc2970c67d 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -245,11 +245,9 @@ static int soc_dts_enable(int id) static void remove_dts_thermal_zone(struct intel_soc_dts_sensor_entry *dts) { - if (dts) { - iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, - SOC_DTS_OFFSET_ENABLE, dts->store_status); - thermal_zone_device_unregister(dts->tzone); - } + iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, + SOC_DTS_OFFSET_ENABLE, dts->store_status); + thermal_zone_device_unregister(dts->tzone); } static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts,