Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3178782imw; Mon, 11 Jul 2022 03:39:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tbVROwxXY4Bhp8z6Bhklftcd5hlcT0N0LYcVUZvR6WJTN9npO8p4ECKHqrcPCbrNqdiLZ9 X-Received: by 2002:a05:6402:50d2:b0:43a:8487:8a09 with SMTP id h18-20020a05640250d200b0043a84878a09mr23916692edb.232.1657535991940; Mon, 11 Jul 2022 03:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657535991; cv=none; d=google.com; s=arc-20160816; b=lco+S5ZOh/K9dJgA7lHGLa6ioZwaLGI3n3Fh+qhQ4yJdKsSos4xpR6ZjJdMCpnEh9/ PLISFxUzx+MSOJRn46+8VqMNQuKZJBoiy/XplZvPRmJ7UA3z1v2Lc5a9avKQX47CBzIz 1LHJHbmPn5B4aXo7pD4tMtC8xy//hypN8FcFB7b3fFGNDZ8Lf5hTVup+W8RApZu87fyf 7bqw1v3vJHmjUhsZOrJAtFqufVobKoEnOkMPvzI8rTCFFEeJQNJEgdLrN1PgZJGL1r72 ZbTnA40kMScnetiB/INbKF8S3L49jOXSGds1x8KY2vWqHMZxYYKqBDABuplsUjPb5R4f Xi3g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DFlfiJ9S7PJ97iNjCLDx3/mWsPQzYlSKmALNf/X9Hs0=; b=B48un0IFIN4pmtgxnaxTgYXggH3XNXdho0ZNsMnntWy5MnraNwakmD1xRlXKvU9Mri Iffynet+E0ZRaDjf6LIXo0ByPCPGuCTj96eAqH2k5NJmDX/OgLwiS9fIaw64qTkR3sp3 HEMlbRQ8gcXDcy5LYMicVF4W4Lc7vYpAkVkpwt1oYgtDoVqSD0WeLGeKOMNAMXo0MyOe 9k9MY1MQ69va5lTV1zPTWvHRhLGygIW9BE1/A0kjiVQ1AmHuv6Y80wcATfpbxXMtaYrl V5ruj2svmECHpKQlmGuzmZuQJp2fT87sz5donU5wLiIbR4+tVZ45m4GwqQsutU85Igs2 wYgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B8z0QxZj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a17090657c300b007263a6115adsi8570913ejr.893.2022.07.11.03.39.27; Mon, 11 Jul 2022 03:39:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B8z0QxZj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231835AbiGKJXK (ORCPT + 99 others); Mon, 11 Jul 2022 05:23:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbiGKJWm (ORCPT ); Mon, 11 Jul 2022 05:22:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93CBE5C356; Mon, 11 Jul 2022 02:13:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 84A7E61188; Mon, 11 Jul 2022 09:13:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63EE7C34115; Mon, 11 Jul 2022 09:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530806; bh=ddvnf/kpXr5ctM8ugEd/957e7Vj5A8FhBl6VTjMoKys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B8z0QxZjlmOFDuMPD+tIQ9PqjRk55LKd99aEK2GwY9uxDDXCAJk8bBqk77mR3na6g 92jV3dy6l9X3V7hAOoiypR9Adl4y771EEeblo1+89UqxNMhCRKANYZFAxl3bN5nwB4 5oC5tMCu+NkEOuSCJynO8ET4vihtnqU28kd94YTU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Satish Nagireddy , Lars-Peter Clausen , Michal Simek , Wolfram Sang , Sasha Levin Subject: [PATCH 5.10 45/55] i2c: cadence: Unregister the clk notifier in error path Date: Mon, 11 Jul 2022 11:07:33 +0200 Message-Id: <20220711090543.084972317@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090541.764895984@linuxfoundation.org> References: <20220711090541.764895984@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Satish Nagireddy [ Upstream commit 3501f0c663063513ad604fb1b3f06af637d3396d ] This patch ensures that the clock notifier is unregistered when driver probe is returning error. Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller") Signed-off-by: Satish Nagireddy Tested-by: Lars-Peter Clausen Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-cadence.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c index 50e3ddba52ba..01564bd96c62 100644 --- a/drivers/i2c/busses/i2c-cadence.c +++ b/drivers/i2c/busses/i2c-cadence.c @@ -1289,6 +1289,7 @@ static int cdns_i2c_probe(struct platform_device *pdev) return 0; err_clk_dis: + clk_notifier_unregister(id->clk, &id->clk_rate_change_nb); clk_disable_unprepare(id->clk); pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); -- 2.35.1