Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1062720pxb; Thu, 5 Nov 2020 23:07:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2rDB8YKVpFT5X81lrgYNoZcTtkfIUE/vXY4YdSb9OP5H3QeGckmHEYrsKIyOR8WMuWZh0 X-Received: by 2002:a17:906:9458:: with SMTP id z24mr730795ejx.318.1604646440334; Thu, 05 Nov 2020 23:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604646440; cv=none; d=google.com; s=arc-20160816; b=jE7MWy1IaEBok0PslpaUZkuJA8o2yKMCIrOFfKD1u2JSb3xc6beM14uWjEHfhJqeTW 8TTtiZXsJh5mJhdzJncZKPZYn4r7FgmM8I3C0HhgOe/na0CyFB6y80Ple6LHxlBZ0ECC KXjdq2LlOBYvGd+/mYI81h/Vz6iK+TRXwp+7J0L1CnyCYregmo5ZVsm9TJfDIZDjQWOy JKZWtSxmk43eaoEZu1EssJ3yo+kF1F6Wzt2iC5mluQOGX0PiKJY6b2LUFElRGb0L79jN sMSiF4VGibeC+C9mXEwwBNeC561sMUEXtL/jyfn++6doIESkVrbO6AO5kYf11k/+BScn 3xzg== 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 :dkim-signature; bh=SsT44B8TOti3vqDBsPwYpvUpQYIln1nI64StpRu+PIY=; b=GNymhCecUYg1GL/+fEJDIEI9gsDFhpY6Nv4tCnSqR/iicDp/i8Vmc0NWGthVoy2jWk FIZZGrnann4hikZ7wko/I3NqGfFIcQYVSo1nKNzNLOp2NmiIYgi5i5Q76SAEXXMgpaTU dQsiNEUsHBW5FKs7SnaVqfpKMGAtY5un9Lu860SLOihp5lS5ckoFTPZb2NDotEDq+jsK nVkN64s2mw+d78g3xvUhVxMCPNoANupFCProT03RnW3m48PlPdeOfpX/6loNo7uZa6RB aZk+oLhoVotrHMh8pE7iNsYzn7o9E1oh0J/qx2ZkotaeCIRgoer2+2qfGVyl+9/J9bqm SYtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HCi2LBTk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di27si332146edb.486.2020.11.05.23.06.57; Thu, 05 Nov 2020 23:07:20 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=HCi2LBTk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726339AbgKFHF1 (ORCPT + 99 others); Fri, 6 Nov 2020 02:05:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbgKFHFZ (ORCPT ); Fri, 6 Nov 2020 02:05:25 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A3B0C0613D3 for ; Thu, 5 Nov 2020 23:05:25 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id f21so245531plr.5 for ; Thu, 05 Nov 2020 23:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SsT44B8TOti3vqDBsPwYpvUpQYIln1nI64StpRu+PIY=; b=HCi2LBTkx3q9cFQ31LcoZa9qzduR7Ac4seDkJ2c5MmJURGaxGFDI0oPLEZ/s8JDq5G /YF0e7tcr7QMwRDVOOBYsK1EzYoPLJflHiJSV8s8s1WWBz5l8NL5CfLQ8YofnxC8LANE FGjPHxse7Vtg/yymkrq0UEzqqbIBrAVjIeIhOUjIdysrypGwrNSkUemIpO7NuxJi1RKh nlyiuoY5AVcJPT78mO9gV1jtljiE4i7fNZT6lpSu5ucdgKdnWUjAWJNX+wne1CidvnPT 50zsQuRiiCQ4KNmqe4HUgraFHUmgNxif9ZRzdF4VFubxr2a2s4p3KinEnytaWsoaEoqH DdSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SsT44B8TOti3vqDBsPwYpvUpQYIln1nI64StpRu+PIY=; b=IlqjSabnRdT0Y4bO5AlgOTvCA+IJmnUqUGKpqu4Edkw9QY1FXQgH/pvV5dfOSfXGTN qCruFLtzjvg+ddcBJWacLXCFdJYBRt0Kjy38CAd1QIs369+Sm1Dxk0z207b8shilBjc5 egSCtidQOvTl9mpUSx9Vv8HJDvgWCjF7jXtZhfJtCmD//3Feh8yQ53Rz9YVtS276yjdc 2tTkEaufLzftZOHvBwED7E0Q12/DDr631WtupwOM6ZlqqlpXK92B6VOK/Mhci3EzrLuu 5i3axNyuGPTGv4mP6r4doSyRux317y2weZFQgQ/zD+j3Xy0YUxWv3/033U7rxxdPEtfN AVUg== X-Gm-Message-State: AOAM530xAiT7+oBTo1bimQe/VfYlvFI7lGF8JupBwmZr/C1OxIF2OFcv JjnSlO1lZP4VEjXajN6tchWZ3g== X-Received: by 2002:a17:902:bcc6:b029:d4:db82:4439 with SMTP id o6-20020a170902bcc6b02900d4db824439mr565906pls.63.1604646324964; Thu, 05 Nov 2020 23:05:24 -0800 (PST) Received: from localhost ([122.172.12.172]) by smtp.gmail.com with ESMTPSA id 192sm803859pfz.200.2020.11.05.23.05.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2020 23:05:24 -0800 (PST) From: Viresh Kumar To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Stephen Boyd , Nishanth Menon , digetx@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] cpufreq: dt: dev_pm_opp_put_regulators() accepts NULL argument Date: Fri, 6 Nov 2020 12:33:22 +0530 Message-Id: <1277c2aa85ccc4fca1792b8311ea6af0c99ffc82.1604646059.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra checks. Drop them. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 66b3db5efb53..5c049428a6f5 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -291,8 +291,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu) out: if (priv->have_static_opps) dev_pm_opp_of_cpumask_remove_table(priv->cpus); - if (priv->opp_table) - dev_pm_opp_put_regulators(priv->opp_table); + dev_pm_opp_put_regulators(priv->opp_table); free_cpumask_var(priv->cpus); return ret; } @@ -305,8 +304,7 @@ static void dt_cpufreq_release(void) dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &priv->freq_table); if (priv->have_static_opps) dev_pm_opp_of_cpumask_remove_table(priv->cpus); - if (priv->opp_table) - dev_pm_opp_put_regulators(priv->opp_table); + dev_pm_opp_put_regulators(priv->opp_table); free_cpumask_var(priv->cpus); list_del(&priv->node); } -- 2.25.0.rc1.19.g042ed3e048af