Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp605680pxb; Tue, 5 Apr 2022 15:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy97r2NQDVSmbExWhwvGitYMVXbwwkLkBCQ5AhFxBye807KtOX/upwjB41b4+iFk5P/Irv4 X-Received: by 2002:a17:902:e791:b0:151:dbbd:aeae with SMTP id cp17-20020a170902e79100b00151dbbdaeaemr5626069plb.171.1649198614758; Tue, 05 Apr 2022 15:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649198614; cv=none; d=google.com; s=arc-20160816; b=MFTK6aiunz/kQBjolasA30kwFOrEFktuuS5bVktqyGCXnpTtWB06iR7psmKHCCZTtY COjJYjQXMOxpcjPDicEu3sf21LlCqXDc0msA8BF0Zu2Ivyu4veHGUqskltgp2MLj1+Sq XEoEaoOJj3bUKxMwQN2li20RU2k5/FboYfSJzSABCFypXn5GPO8bEbdO4PtHMAF2thk7 K2TlHqb8iXbouHWskkAI1LS53JPTeE8KJIdgPLAqJTgm8AOT8+oeEfkzx7TipKS966UD ioXehr39cwYT+qhcZjIZKx6zqxcsJ849k3Xj0ODBUI5WMM6h68QH7G2agqQFw+6ceCyJ uDeg== 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=wupI0p5e+s+NohT/2GL1HjKpMcF7DxWg1D/4BM5nnA0=; b=Hj6ihfaD0Qg2YUHICLwQ+oXYN5LDcckWQBFnsBDgjNcm3Z0HKvelmUot4KTY2jbEff s+LqOXJ7NXHMpFS5Tsu+gFi/k0kqzdHjfsD6LE4R24fgF3SmOGb1vfzx13GOpt2qGMZr pomM20lCurAOx86iHD7o42z1y8SElISdETImt0gLZo20+72qaa55Z8K3Sjzy+dK2WFPi kLli1J2HRpAHbZn7bx6fds9qW7k0qoZ7MwGT/6ypYNhY6OUNOC+tmKgrufQoiGZ2slMP wmIMKy0rDRlf3RhvsNm++iNILrYX0VXbiyxpr/eKDKE1oXvCfH1Fy7YOEXVJucBtNo4Z xz3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uhaYbC4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q10-20020a63ae0a000000b00398a0c97c69si14794847pgf.751.2022.04.05.15.43.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:43:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uhaYbC4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D24AB6E8D6; Tue, 5 Apr 2022 15:24:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388365AbiDENWE (ORCPT + 99 others); Tue, 5 Apr 2022 09:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344416AbiDEJT4 (ORCPT ); Tue, 5 Apr 2022 05:19:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9D99C36; Tue, 5 Apr 2022 02:08:14 -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 2865061573; Tue, 5 Apr 2022 09:08:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39085C385A0; Tue, 5 Apr 2022 09:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149693; bh=IarqHDYKJbHBln3CcZKc26LuO7T/MvquBPPP1r30uhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uhaYbC4Nax8EB6dlLoHpHTlTaECGbsuMG9XCfEFDwgI4ZaAH8/DHEJ2lmQjCM8cdn f+E2JZhNB0TOnrtclj6fFEPXwh9NHkjXhFq3oZ6faPkLLvOjmMa3hgkKsvXx2oGM2a +eEyKMSd7noGI3zbMUMCm9BaZFq8tpKu3WxxQzN0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , Lad Prabhakar , Biju Das , Mark Brown , Sasha Levin Subject: [PATCH 5.16 0808/1017] ASoC: sh: rz-ssi: Make the data structures available before registering the handlers Date: Tue, 5 Apr 2022 09:28:41 +0200 Message-Id: <20220405070418.232674644@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Lad Prabhakar [ Upstream commit 0788785c78342d422f93b1c9831c2b2b7f137937 ] Initialize the spinlock and make the data structures available before registering the interrupt handlers. Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20220110094711.8574-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sh/rz-ssi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index 37466f65c2b0..16de2633a873 100644 --- a/sound/soc/sh/rz-ssi.c +++ b/sound/soc/sh/rz-ssi.c @@ -977,6 +977,9 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->playback.priv = ssi; ssi->capture.priv = ssi; + spin_lock_init(&ssi->lock); + dev_set_drvdata(&pdev->dev, ssi); + /* Error Interrupt */ ssi->irq_int = platform_get_irq_byname(pdev, "int_req"); if (ssi->irq_int < 0) @@ -1024,8 +1027,6 @@ static int rz_ssi_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_resume_and_get(&pdev->dev); - spin_lock_init(&ssi->lock); - dev_set_drvdata(&pdev->dev, ssi); ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component, rz_ssi_soc_dai, ARRAY_SIZE(rz_ssi_soc_dai)); -- 2.34.1