Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp925948pxb; Wed, 6 Apr 2022 04:29:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+Qt8hcoRbdJ7QBUyEu7juALelJrSAAWKpjkgJUG4FEgAkaDquIdVvTca1NfWeMeru6ohp X-Received: by 2002:a63:7013:0:b0:386:afa:4582 with SMTP id l19-20020a637013000000b003860afa4582mr6738854pgc.391.1649244568420; Wed, 06 Apr 2022 04:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649244568; cv=none; d=google.com; s=arc-20160816; b=oGMzefb5bijwXFXBKbgJNXmI0rbRUFStyfSvwsqYpHRcXBecckjF2VhpElLy8JMXlX z/ndnEaA9WvB9JD8ZbQKFCsPjb3yUkQQNRG+ZhZumAxNoceCYEp59x3YLd9eKNxGgRwQ PZ1jw+0+tbDEjR/ggA8Nmb4FI+FoJ2KRB7KHWcKBsyS1zeuJPdIXW1ZuXPKPhonyuHZk Ux7bbg1fjNC9drEF4LscGU5oZuD2nLV+lau9VSL6IRweOaQ0Td7q42kaYiRXgarjuXcN piX8tb7+dGHNXsS6uijSBhjjqxTzScoXbCXvZ7rhurY7WENz+wT7N7CjOxXrANFw126v DNVw== 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=VqWViCA+0IWg3HiKMIpuObrRB0jgUkXkvC2BoeYjzeQehaZAt2VfkKsDctnp5g7ktV mNM2dvA86i+VCpVeNLwRQ2WB+NYLQkQcOAvKFqK5RUN5cC8Uaq3hUTb6zbew9jjlZBxo jSZn3FnEPeC9XZ9y+vkff7l3U30BulCpo20lKmc8Ui0zhip5GX8EiyLkBwnyoB5BlEel sYqejv/dZJLyx5hF6OAsENm642hqsX3KDHSfTrcDFnMJ1F61CaNmE8TqygIo79h3ITw2 BeJCWrUCQ9FLh8qEe1Yh36uwAkJJzNrSK+BtQi2zcQk9/mbhnVIlPXqWi3BiiiLKe6xY Amvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RlYRI95r; 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 y29-20020a634b1d000000b003821d32f04csi15257261pga.116.2022.04.06.04.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:29:28 -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=RlYRI95r; 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 8893D5FDF2A; Wed, 6 Apr 2022 02:51:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1844228AbiDFBqc (ORCPT + 99 others); Tue, 5 Apr 2022 21:46:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351543AbiDEKCi (ORCPT ); Tue, 5 Apr 2022 06:02:38 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F94D6EC64; Tue, 5 Apr 2022 02:51:55 -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 sin.source.kernel.org (Postfix) with ESMTPS id F22DBCE1CA0; Tue, 5 Apr 2022 09:51:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1611EC385C1; Tue, 5 Apr 2022 09:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152312; bh=IarqHDYKJbHBln3CcZKc26LuO7T/MvquBPPP1r30uhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RlYRI95rrs85MTWekBOPL1aGRy5KjHig+z2vFAm5EWVbLtmnXDfq3cCYZ+sIgfSue 2J/XjnXKbRAFfp7tXU/Je0Cw2rFbiDBEvV8YjEF0zhd8yN6RPT9tYM4Hd0M2aG+8tH OWuzVhXzI9DyfolPRrodw2QybC/8evv7V64vGvOk= 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.15 730/913] ASoC: sh: rz-ssi: Make the data structures available before registering the handlers Date: Tue, 5 Apr 2022 09:29:52 +0200 Message-Id: <20220405070401.713076262@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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