Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3164965imw; Mon, 11 Jul 2022 03:18:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uVDj8mua6RR630cW8F5gvwvOhft8sfn1fw6KIn04hLl68YFHmA+NjoT6qaQf3fJZgm5cxW X-Received: by 2002:a63:f114:0:b0:40d:bf0e:1f3d with SMTP id f20-20020a63f114000000b0040dbf0e1f3dmr15358613pgi.23.1657534739036; Mon, 11 Jul 2022 03:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534739; cv=none; d=google.com; s=arc-20160816; b=CyO0BzsfuTLqkil/EqiLxjWSRGnWx4vA75RdKbXKAdo4zf/Mdi093KVSEqk8fQ+JGr 2BAGFjl4SttExzssUJ1lkOjd27bGW3kDrcXabd+lNW4uvgo3RBdQbAHeSRIryB8r741y fN1H1IDY93HivYXsyXaoDM9C14aTkzLhYIi8ZJQk6bwoYiwGoKfjhMujkHLKZKscRe/a Aq9D0SbCUara81OzP+mYTacnrYE+u6ssSjqZE9bTAQCc6L3ngbpaDaH0OLd0ccO6qS/o WK2u9gKHRM0hp2d0jp1I1eB2P3KwZMNW8HN4k8AFuPqeKfQHtkYyVOCbu7ZnPY4RC1kX jsYA== 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=EP4ikWlKJ38rTty8xfchr7uPf/ToqNr72gOzEJ73ilc=; b=OYyGEFzOqhpqCHxjgy3Km3WfHbMhiDRLJ9G6/z+aX1l+GKZFtBqNVruDNuWbVPW1lG u1au+u7pcQvk7QbNHUZG/9H3M/HO8rsS1cO2MME41E8KJlaaFdKWid0Mzqtg5kgNcLt+ FICr/hBNDh/wEjiOsvKwlm8d/HC1wM5q5ynIo/88KyEVvrC4jgh8Bfv2Zx50yW0rgCRx xyoSjX3PcgzZmdPv7A9AZf6NiI7lCBwyDV158zrbtz1hPh1PMbGIiDUqO5QRpl1y0UOE OJ0ffzbT6uOQilETOLvCz9fgETAMaB3qFP72kP3CvIcGpqwk0GoWsGFukYVZ12tvl9s9 5wsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nsmcR7gt; 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 c28-20020a634e1c000000b004150c9d4e49si11056558pgb.80.2022.07.11.03.18.47; Mon, 11 Jul 2022 03:18:59 -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=nsmcR7gt; 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 S230515AbiGKJHr (ORCPT + 99 others); Mon, 11 Jul 2022 05:07:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbiGKJHT (ORCPT ); Mon, 11 Jul 2022 05:07:19 -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 B112422B1E; Mon, 11 Jul 2022 02:07:15 -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 4F8D161188; Mon, 11 Jul 2022 09:07:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F7EDC34115; Mon, 11 Jul 2022 09:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530434; bh=XD998FoUy+aewdU9KTZ9JC7PXHfD2tl8I1AX7k+wJ/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nsmcR7gtxU7X8HgmYnyx+mDaVltxctX1L+1hEV/PBCErFU+KUl7QQreBfsL/6qkrd a9e6keAqWuDJeDULgMPkzC8U7PrHn1zOL/iLVEkrpHgXJg/au9fI+Af38VdEF+UUug MA59+DPm16khWFdctOePHzFXqjJI4MPqDC/3s6nE= 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.9 10/14] i2c: cadence: Unregister the clk notifier in error path Date: Mon, 11 Jul 2022 11:06:29 +0200 Message-Id: <20220711090535.824091103@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090535.517697227@linuxfoundation.org> References: <20220711090535.517697227@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 @@ -992,6 +992,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);