Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3973134pxb; Tue, 25 Jan 2022 00:21:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCqRbzh8Ku4Xyle/JqeAXErY7Lz7c797eKReRydum7jBOsTGY4CO36z2hKWXkEitK/MMN0 X-Received: by 2002:a05:6a00:88b:b0:4c5:b37f:75a2 with SMTP id q11-20020a056a00088b00b004c5b37f75a2mr17318560pfj.0.1643098867556; Tue, 25 Jan 2022 00:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643098867; cv=none; d=google.com; s=arc-20160816; b=CnZRQV5TYu3slYNGo5iyZZ/WOEVPkq9M/ewgIqH+Z0lxBcNjQBVPI6uBT+TVnYvEmv blvBHGIw7IreTwv/+3Jv+Vok9fMVvpLyr8jMTajQe0BLPYiA1zswWvbDQLUjGV/atKIl zR0pPytCuh75fuqXRtAPlvbzGq/+xHn/iWphyi6nUZHWJbPopQKLGcw00JNCfc4AcMY1 NHvfEvqoOhxAd8k1GktscCxnmPuuSCsQCqryRTH9GiwXDYP2AhflnKWkeX4eTB3LNsRi D/gDSYHpXQ030tghpApZphNpTQsnGaJZcIvd/XQxWhnch1W4aDPqSxB1F3EH/IcOpFxA RLkg== 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=Tagb2xEi3L1bomGLt6qBq+fQd10noGRiqSiR+4nfUa0=; b=ka30l8jpLpONkbSi4w05CHt+y9BWz9JEBNGIDqu1aOop0K1ullw2W0V13AMq6HPl+V mW0nASTmSGBlkMdqkWazIreIll2dv8yYXbGej1IxmMQD01qPWGfu5wYcYQfN8O65UcKd KJDt4IoAFs+mH7YzwqSCd9miyjEPhd5N9xmtqEIWHiGCXTXmzjbYpopJcsIZ//KX6O9X A+H8NXLPzxbKCoYD5x0FxMQj8fDlF2FF4b1IMRI+KxC+c/3+D05O0jzEZ+OIRwOjCiPP rt5+Ax5Az2EZd11o3BbUbRax2YG2NKTG642I/k2Q2KN5Ke7PxU4WGByHQdUJusxFqA9w IBQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=urY9Ppkt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w198si13075155pfc.73.2022.01.25.00.20.55; Tue, 25 Jan 2022 00:21:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=urY9Ppkt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S3413412AbiAYAjB (ORCPT + 99 others); Mon, 24 Jan 2022 19:39:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2364000AbiAXXqc (ORCPT ); Mon, 24 Jan 2022 18:46:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18C91C034003; Mon, 24 Jan 2022 13:41:23 -0800 (PST) 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 AA7DA61523; Mon, 24 Jan 2022 21:41:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91DD5C340E4; Mon, 24 Jan 2022 21:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060482; bh=c2qXLrMSjxDS76K9hZdCjkLK1zTrQr41ndm8rdt8eUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=urY9Ppkth5aXOYe9g/F5L7hhOB9HF+jQ+C9R9cvehKPyPuZiTe/KiMJyLqN5meRCx xtQtDZi2Ha+jKstelLU/2c/sSpfDzf+OdfGxJCPCr2cLT3s36Wu3HqdECz7M8xQ4ZL fhCP6p+2EpDJUrqWc8f3WilFTZj5FAUrwB7jAjdY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Hancock , Stephen Boyd Subject: [PATCH 5.16 0962/1039] clk: si5341: Fix clock HW provider cleanup Date: Mon, 24 Jan 2022 19:45:51 +0100 Message-Id: <20220124184157.628221160@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Hancock commit 49a8f2bc8d88702783c7e163ec84374e9a022f71 upstream. The call to of_clk_add_hw_provider was not undone on remove or on probe failure, which could cause an oops on a subsequent attempt to retrieve clocks for the removed device. Switch to the devm version of the function to avoid this issue. Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver") Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20220112203816.1784610-1-robert.hancock@calian.com Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/clk-si5341.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/clk/clk-si5341.c +++ b/drivers/clk/clk-si5341.c @@ -1740,7 +1740,7 @@ static int si5341_probe(struct i2c_clien clk_prepare(data->clk[i].hw.clk); } - err = of_clk_add_hw_provider(client->dev.of_node, of_clk_si5341_get, + err = devm_of_clk_add_hw_provider(&client->dev, of_clk_si5341_get, data); if (err) { dev_err(&client->dev, "unable to add clk provider\n");