Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1062780pxb; Thu, 5 Nov 2020 23:07:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJoS1sPN4l4nYsoXcQQtSucbdmA40Cs5aHNSqc5GvL7Nf3HXPMnhKsvo++z6wjxk5QhvQZ X-Received: by 2002:a50:e183:: with SMTP id k3mr621977edl.111.1604646446031; Thu, 05 Nov 2020 23:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604646446; cv=none; d=google.com; s=arc-20160816; b=QQZ5honZkKPRv58fyx2BaKuDDFlas7VyhYQDCv+1nHqVwRFW3zwm7ZZstES3DFeOPI sWPlqXzr8rKP0v++InG4Ggz3umhKZDGFa689Tej6E9pXWPRNJVpCv7cryWPsoN90lMaG 3ghWUxmQGPoYk9hwuTgxmmdlMTLXQhIuoqFuJo/woypxKK9dyc8TLML4hC0wB7W6RVsH ZYJzf25RI6rZJvcPJTqlKnTFFPJJztDRWBCtoh4sWHF6bpNvYV4tnahv1nFdzw8Aik4p WGgb3ZUZlUC4eIPALfuIUSeuvOcP+96nLlMV0xMmNlxzVAtSYUx1genJTpuI30JlaLPp +8Wg== 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=bPLnUhtQ+dxcmE2HZpN7gVFh2Ut9iquGsDOuyt2kO74=; b=P9q2jvOqBrWAUOgLQmn91PXEZRglA5K18O06dQ2Wl3O3C0g7nkAdr5Gl+jtQiMSf+Y B5C/G7S6lazonQPlYAGZ+hkRMgQOvqh/95nEEJba8UDpUpCAHESI/WD7c1jHhAGB9oeb 64I4AT2MkY51+yDglMeBrbL4EMhoitFRMrrT1ffrZQ0QeTCR9V5ORd0ejhql9QW8jWSD aBFq8duCOApMOWu+CaZLq8o5VpHLaMZHAICvBNjMXXlL2p91wm7pR2PBED5UUUed15fT mXowUQHV2yDUztbhIYgj3GekJdXhZf4igPPZYlVNZcaajeGdvoBjjZ5g9lGNRzr+3PZ5 U+LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u0KpNSdR; 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 7si325599edk.565.2020.11.05.23.07.03; Thu, 05 Nov 2020 23:07:26 -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=u0KpNSdR; 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 S1726507AbgKFHFc (ORCPT + 99 others); Fri, 6 Nov 2020 02:05:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726503AbgKFHFb (ORCPT ); Fri, 6 Nov 2020 02:05:31 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD3FC0613D2 for ; Thu, 5 Nov 2020 23:05:31 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id o129so482977pfb.1 for ; Thu, 05 Nov 2020 23:05:31 -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=bPLnUhtQ+dxcmE2HZpN7gVFh2Ut9iquGsDOuyt2kO74=; b=u0KpNSdRcvSh+32Vu+x4+8GMjysg6sJiq7B/sGt8ogBO1oSA3jDOLGPpCS1Gd/cAFD 0OoWP2xdGgLxyacl2f604zjp6ou/DJEvb7GsBBpwq9GNFyEr3i+ft0RYetIgg368pllK qyubNricG/aQ37BkTkdxMVIeklBhhk4gfbKt/nnOVGD2VLBE5cY+RfniKlVMt6O4Kl0r p9IiJ+DagxIgUTl/1hWMRHfS/mjHy0xK3Md8d+d/W0zZG7OHXDgiICyfm20dMruPyqVX 5WJgMqWlFH64yHnPunk3djYTru3nfLWKkINRmr900FWq7VLdrUbBXAU5cT2iJp2VraFm pyBg== 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=bPLnUhtQ+dxcmE2HZpN7gVFh2Ut9iquGsDOuyt2kO74=; b=d5SbX51U73R6qIgyF8O+63DSVVfaZsCxiIYgvO314o9f4p+APLU9glCqkprSmYXh0V uuqb8j3Gedn3DerY3ARr0hCGNtt4WhJFEAfpjqgWg8LKki2bCBIl0f62ZDM8Ft/sYX4s JPdTl/lAn+2arXnj2dI64mE7wUhMyXmpziZsCITPa82Xok/f7ZeuleM8afEM61kWKKRX K02mUxJanEweSBm2Goyk40zc8MGEKjBfdI62Px+/N07pT7adDdF7EBnJgsVjsMh6zA3G utril1pQ9qZ7wUc3kXwq3+p79odGd8zs49VJL6Ctlm9GDMN8sGzwh84MnWYhWgRygmts fuRA== X-Gm-Message-State: AOAM532M7mH+/GCvYRYb9V5fOgTE+2lrvwRmH239TbF5owqIaDphXV2i TZQiDZNIQ0SwaYlvBCtAPLv8hw== X-Received: by 2002:aa7:9ac7:0:b029:18b:36d2:784b with SMTP id x7-20020aa79ac70000b029018b36d2784bmr825878pfp.20.1604646331033; Thu, 05 Nov 2020 23:05:31 -0800 (PST) Received: from localhost ([122.172.12.172]) by smtp.gmail.com with ESMTPSA id 16sm779560pfp.163.2020.11.05.23.05.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2020 23:05:30 -0800 (PST) From: Viresh Kumar To: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , digetx@gmail.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] devfreq: exynos: dev_pm_opp_put_*() accepts NULL argument Date: Fri, 6 Nov 2020 12:33:24 +0530 Message-Id: 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 check. Drop them. Signed-off-by: Viresh Kumar --- drivers/devfreq/exynos-bus.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 1e684a448c9e..143fd58ec3dc 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -158,10 +158,8 @@ static void exynos_bus_exit(struct device *dev) dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); - if (bus->opp_table) { - dev_pm_opp_put_regulators(bus->opp_table); - bus->opp_table = NULL; - } + dev_pm_opp_put_regulators(bus->opp_table); + bus->opp_table = NULL; } static void exynos_bus_passive_exit(struct device *dev) @@ -444,10 +442,8 @@ static int exynos_bus_probe(struct platform_device *pdev) dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); err_reg: - if (!passive) { - dev_pm_opp_put_regulators(bus->opp_table); - bus->opp_table = NULL; - } + dev_pm_opp_put_regulators(bus->opp_table); + bus->opp_table = NULL; return ret; } -- 2.25.0.rc1.19.g042ed3e048af