From patchwork Fri Nov 6 07:03:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 320775 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1080144ilc; Thu, 5 Nov 2020 23:05:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRQ2Za3QglmFoBFTJFw4m5fjTfWkPVoRWfteECNJl1Qe6wzldj5jsDEwgfnw13jlDyov3y X-Received: by 2002:a17:906:d20a:: with SMTP id w10mr681077ejz.3.1604646337065; Thu, 05 Nov 2020 23:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604646337; cv=none; d=google.com; s=arc-20160816; b=CAR/OIg0w+dXs4fnnZg8n3oD5IkhDSA6nUM2F/9Vp1YQpusEShZyytXNW3HOIhlabc CP7/HsvPqW3bskQt2CvxqUxwHCNaWWaR3bv7l54esP0DZxMRriqOLHKyG6wkfiz2i4xo m1yJosXMb0sl3w8bQ3bazjrtpAnd15+Wj49gQr7sZHJU+iE9pqzAcs9+Hsypzj5StwFP BEB7zxAvhocHNFQfjXGVQs0Acz7FxaTTkDIl/Eq2vcstxeoJnTcdyWDoWO/yJN13Bfl8 Mwh11ilWemGRdiTTVKBqDrp98kYdIp7NCbzCWmNIctcwuGF8yAhpNXJWueeeWcWrbYXy Mycw== 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=HPUlyhsE/qBCpVqjR8TLC3LsrYmKbN0bi75jXXYTyUQLPgDeIERU/8PbDm+c0MQwCp +WGlpr3Jl9z/cQjbORK4KxpJfnKYmkSDo8cXkBuZrsh37nALWVMzxwIfXW4UjrwtnkTI ARDPkqeXlMBqXptOVjNByES2CtxLbQXHg0cRNze/CTgTr9uVGySMvYkhG/DKXZh5J/JO sL3b8LA/TMzONqXmFqPofod2ts4CueLG7V/M7veygnvA4hpLJQ4mlHnh8w+JiXl1cLM6 6v1nxfHwsDzzfrx4lpHYghXZKTPZ3a5CnWQgbvW0VWwAhMUoy2R/Czr1BtBYIow+MB+T lPFA== 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-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-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 b26si228526ejd.476.2020.11.05.23.05.36; Thu, 05 Nov 2020 23:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-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 S1726466AbgKFHFd (ORCPT + 4 others); Fri, 6 Nov 2020 02:05:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726476AbgKFHFc (ORCPT ); Fri, 6 Nov 2020 02:05:32 -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 7B5B5C0613D3 for ; Thu, 5 Nov 2020 23:05:31 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id q10so487050pfn.0 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=nfU/DY8LPSAKh/qpgzudLBZiS7gmKJaUvFqtaYwJsmVT3kUDvkyaYzmffxL+ZwfeTl zjO8kp/YBcmS41CNAzYPuRo8LLoxw8r7wReybyDk7lIxt3/M537TI4WGKBpYFYHC4t8X B6k6aaydd+QWlH+NJ5diTRyKIN2LBa/Ce2/KAdpo4kMchdEAzz/FOdCHRecr6qpiePjQ 5Vxk3AWorF+IzBGZQ8xD2dMJYDnTLkhRNHdOniEJuzV6028s8Bh3t4KWCtrCwomLZi9h 5pC4jxtfQL6s00z/q6eD5jCRQPPy2uzQEQPStNxvqmrP1I8nHh2ZSrs8owDopuWbsesC KWoA== X-Gm-Message-State: AOAM530Zgu0ZTUzAR3jmaS9ZsQ3uH5PnBb7ImNBH7G62xfb7Oj8sXcjg kUFgbQ/whviEj89WUOFTldirSA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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(-) -- 2.25.0.rc1.19.g042ed3e048af Acked-by: Chanwoo Choi 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; }