Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3162631imw; Mon, 11 Jul 2022 03:15:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfT1UvySJYBR4UMxmL/JDd8db6DOlHFooTCmczBsOsGejT8S9Ad4RBdP+CxqYaSsSaVwXN X-Received: by 2002:a17:907:2894:b0:72b:3554:353d with SMTP id em20-20020a170907289400b0072b3554353dmr12282013ejc.297.1657534552591; Mon, 11 Jul 2022 03:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534552; cv=none; d=google.com; s=arc-20160816; b=DMFhzT+F+rxgXBOxIZd0cadaQj73Hq0iRJCe9Lrbyz4+dXeogQ5oiZOGKP2+z8ntpv OK701no23TvL88TcPNn69s6daRe5AN9T/4Z9M8aQxLcHY1RyMEE0+37P8KuVw4D4+ZGU IZurOnzRAgQ91auhMWE1XmfNQjlKFoLx/sM56bfEgRblFkPOyP9n7lTSGouOEeoHMfsu 8AtcZ1jP1mR9ds1LSZDS5DVpS9SdpGPC/lFkySKUo44CUI4Ojr3Jm2gDH3avPvClhZA6 m85nbwmUhiNGFAnDrnb9o6ouv1nlBg7BjemCKf3Y1edL0W33/++Mx2h/ecddRSRNC1bD Yn7A== 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=iTF4GiaYBvyQYqUfSzpWE6kXxLjw7V0TE2rzeza8Z8Q=; b=AnhAB0wsDglRmG4KUyo6YkpgZitLo3uYjhgRqkaSHrwywkLApxKJ1QTTqxNiofXXUN gBIeO6ptx1hXG24C4HDFp+zowGPlIxLqXUMWgwxiFwxe7vwh/NjNh6+wAdTYtc74wDhW zmITvkp3Wd0mv2Sldeh9GgZuv4YBfAVLzBw/FlsZ39xPN8ZTekoGB1PuDUuV2w9j03C+ R6EfFIbZuw4eAy0kx0CRNsqW2458+VCatgXezn7rAEqsTkxaCbMB7F6uKH+zqX/Fb9xh 1QOFjiYgAKP2002sTGOarSWA698inEzcbLBmCICgHTAEnC7bqXiqIoI3cM8ULguA5SD5 5UUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tXpajff7; 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 t20-20020a17090616d400b00706b9787b43si8611000ejd.319.2022.07.11.03.15.27; Mon, 11 Jul 2022 03:15:52 -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=tXpajff7; 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 S230128AbiGKJJE (ORCPT + 99 others); Mon, 11 Jul 2022 05:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230520AbiGKJIQ (ORCPT ); Mon, 11 Jul 2022 05:08:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD51222B1D; Mon, 11 Jul 2022 02:07:43 -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 3777C6118F; Mon, 11 Jul 2022 09:07:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44D3DC34115; Mon, 11 Jul 2022 09:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530462; bh=aFXRT0ma0toellNu+x8gD8/rkeB50zhZA+nMSArnUY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tXpajff7PIKRp4sedCcHp0bDwb99bAi8hLL3O3VBBNq3RQEd4wYgbfL14JifbPqWF 8RvyXmZLbvx56zxlpUGTebDSztIekcpbjwihI99AoUB0OO7Cn0sFPfwpJykoCLl9+6 VfW3YjAmNkhzrEFBxUB0A/caL3KWieP3el227hBU= 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 4.14 13/17] i2c: cadence: Unregister the clk notifier in error path Date: Mon, 11 Jul 2022 11:06:38 +0200 Message-Id: <20220711090536.658096693@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090536.245939953@linuxfoundation.org> References: <20220711090536.245939953@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(+) --- a/drivers/i2c/busses/i2c-cadence.c +++ b/drivers/i2c/busses/i2c-cadence.c @@ -990,6 +990,7 @@ static int cdns_i2c_probe(struct platfor return 0; err_clk_dis: + clk_notifier_unregister(id->clk, &id->clk_rate_change_nb); clk_disable_unprepare(id->clk); pm_runtime_set_suspended(&pdev->dev); pm_runtime_disable(&pdev->dev);