Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4619849ybl; Sat, 21 Dec 2019 10:22:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxr3ONBt9ztUiIOT9kRP1a4y6xE0dypZCrIaAVGpjHBzpZ84gZ32WTN3Rxo7HjkPrAwdudF X-Received: by 2002:a05:6830:1bf2:: with SMTP id k18mr21690937otb.36.1576952520201; Sat, 21 Dec 2019 10:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576952520; cv=none; d=google.com; s=arc-20160816; b=vhm5d0YmotuhbgaEjjn4ls/gAagmbpusAiXXxsuFTtENWG3Beb/Wg2EwVoZ2RiSN30 uCirPyf/T3x09acDvDiaZ8MLnSxcHCg4AOwX7liUY3T7N9Ztqi7op7QEoXPS5cKAvGIC vxv0XvCcNVbhlJ7v/PjHOxzivAu+2CnVhVSkvIqHy/XZfoNek/0Sn0f1kGdS9f7GXQFj ei4DFuXtQWDTjpMv00tSm+tJ0isHhVbWrxkMiLKLidxlx4OuSlkLJq6/CUkw7QdZx1aA t80r0apm4xjSwgk6foOWQcEyoT4GDPXAJssKQ99aIgLi3RcmNGfeK7swV0FLgkjGsK4i FxqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=XZWzStVGaglhqJ2FheU5GU3236NOGrsoSxq0qw1NNLs=; b=DI/A7d9RQjsgNaTfISqPQ5nwV+egOrnDMHek4WtKNNj/6ogc+Twe/IgnIbNsJWsy2j +K2ychdWc8AWxEzsFPfDLC76suqx74X2vMN92E0Wk5y88FOHoloo7qT5kxw+CBxRpInI f9hmlbi4Am8TXvlv46jcJX89cFpHCdqb/n4cssYACNe6QxIxwhhxJShg1Ah1TZw36hc/ jQxVEUzeKEszNCXjNDqmwelbHDqE12pie3/Ekq+vqegKWxc0Ki5G1ugOqY5suQDijpxV +LaJjy2jCrjtHsZFNjn5sde47ccJguo6VEIjZ1nAO0Z8FiWGw2trThgJyFNYFMxp3oeA fKXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EWrwVgjB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j70si6950572oib.219.2019.12.21.10.21.48; Sat, 21 Dec 2019 10:22:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EWrwVgjB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726976AbfLUSTB (ORCPT + 99 others); Sat, 21 Dec 2019 13:19:01 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45381 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbfLUSTB (ORCPT ); Sat, 21 Dec 2019 13:19:01 -0500 Received: by mail-pg1-f196.google.com with SMTP id b9so6630705pgk.12; Sat, 21 Dec 2019 10:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XZWzStVGaglhqJ2FheU5GU3236NOGrsoSxq0qw1NNLs=; b=EWrwVgjB1N880JC615Xe0QmqiK1DQhoUA0Hp7hkEB5XECyH1lHU8eIJ9wt4aaLKkYj Ff4+IO2fv/ON7kJ69aMVwra2254836TqyJMOTFrekhxQCEbPBFLHeHdvMfMU8iJocJyZ WvWVm2fMO+YQ/fJGOxv7HoyS5i2o6aoj/cie/vHX46P5xzhWE2D7xIRvd9jOYx6XEITD vIeX9JdPd2cF/mSaFYkKatXdGhJsSLMd6ZlaipCKhcbvkNe2yKXyqCp7IjnxF2iVDQ2N HHzZOSLjweiYJZ3e42ryJ73Spizat9uCbHl7SR7lQ8gTnyYGBmDQNgbwitXgcdqVzGj5 9TCQ== 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; bh=XZWzStVGaglhqJ2FheU5GU3236NOGrsoSxq0qw1NNLs=; b=tT49w6fDLX8lHBRmq5miyG00231RvVwZDypX3D8F5VSF0Wf8+wT683x8xjjEdUlmR2 fbz51AHTMG1daWQVUmWunyMW8K9h7AWt8a6pDcUxhHNyLec1yXFPqjuMDlXwPmWolGlG Lk1mffs6X5NZv0gD/BI2pr81gw7UhPrpvBBVMiD2JBfZYT8yl400OVTCoKElqsBKDqiP CSOyFAk+jwPLcicW3gCgNenRaBmNrR9OiuvTJ8jYG0slzwlR/KkIh0pNtPfcF5jQitO7 k1eW/qL6gTVC6v6/Xzvpambhv1SFyBsu2Lka8xAL4Gp4BiEoXCLXCe16Y6dOr6rN6RY5 N4vg== X-Gm-Message-State: APjAAAXFsXAg2U2fP8zzZYK/IjL6nf4xUvhNXGJ7E9tLYQ71nbIRC34e ZjPOoD+gLC/PaplymA3LrQOVo/Seds4= X-Received: by 2002:a63:4287:: with SMTP id p129mr21803975pga.122.1576952340297; Sat, 21 Dec 2019 10:19:00 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id u1sm17467435pfn.133.2019.12.21.10.18.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Dec 2019 10:18:59 -0800 (PST) From: Yangtao Li To: cw00.choi@samsung.com, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, kgene@kernel.org, krzk@kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Yangtao Li Subject: [PATCH 2/2] PM / devfreq: exynos-bus: add missing exynos_bus_disable_edev in exynos_bus_profile_init Date: Sat, 21 Dec 2019 18:18:55 +0000 Message-Id: <20191221181855.31380-2-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191221181855.31380-1-tiny.windzz@gmail.com> References: <20191221181855.31380-1-tiny.windzz@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The exynos_bus_profile_init process may fail, but the devfreq event device remains enabled. Call devfreq_event_disable_edev on the error return path. Signed-off-by: Yangtao Li --- drivers/devfreq/exynos-bus.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 7f5917d59072..5e54eaf3cfc6 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -335,10 +335,14 @@ static int exynos_bus_profile_init(struct exynos_bus *bus, ret = exynos_bus_set_event(bus); if (ret < 0) { dev_err(dev, "failed to set event to devfreq-event devices\n"); - return ret; + goto err_disable_edev; } return 0; + +err_disable_edev: + exynos_bus_disable_edev(bus); + return ret; } static int exynos_bus_profile_init_passive(struct exynos_bus *bus, -- 2.17.1