From patchwork Wed Jun 8 02:11:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 12872734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91DECCCA47F for ; Wed, 8 Jun 2022 01:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6xb8YVs+nEwBBLVaatEEjP0sDPd7vik8vYpsCedC3vI=; b=zWTGzuor4zYVlm 8Oqq8An7j9+dW2ZEDhsVEbpQY3VBahRTKxK3s2KX+/qQg2otsg1orYLF7+ktTsUuZe6GPWo60zdor IOIhqmfjwAEC1C0P8j3YaLZjuWG3xSN9vJpJafBubinNc042tAak29d5GXwQOb8VWZ/Tfi1cTeqhg oos0aAhd8CYJL315E/R95pLWtf+gHT+Wj/BKl+/EEjHgQ4tmcSXdKgoaNIRk0GUlUvqCoOfNKovR6 2dT5TPXpIZ2LckJZZAIejVgIU+GWwJ+KxrxeRXABf6qX1WhHX+R/6NxOcZ7tv+wrNr13asIK7PidW JPCPm8tJpxMSkZR6Lo1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyktD-00AIPB-Qq; Wed, 08 Jun 2022 01:53:43 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyktA-00AIO3-EU for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 01:53:42 +0000 Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LHqw05xKSzgcdJ; Wed, 8 Jun 2022 09:51:44 +0800 (CST) Received: from CHINA (10.175.102.38) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 8 Jun 2022 09:53:32 +0800 From: Wei Yongjun To: , Michael Turquette , Stephen Boyd , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Gabriel Fernandez CC: , , , , Hulk Robot Subject: [PATCH -next] clk: stm32: rcc_reset: Fix missing spin_lock_init() Date: Wed, 8 Jun 2022 02:11:54 +0000 Message-ID: <20220608021154.990347-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.175.102.38] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_185340_692039_34D5E0CA X-CRM114-Status: UNSURE ( 7.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. Fixes: 637cee5ffc71 ("clk: stm32: Introduce STM32MP13 RCC drivers (Reset Clock Controller)") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/clk/stm32/reset-stm32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c index 040870130e4b..e89381528af9 100644 --- a/drivers/clk/stm32/reset-stm32.c +++ b/drivers/clk/stm32/reset-stm32.c @@ -111,6 +111,7 @@ int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match, if (!reset_data) return -ENOMEM; + spin_lock_init(&reset_data->lock); reset_data->membase = base; reset_data->rcdev.owner = THIS_MODULE; reset_data->rcdev.ops = &stm32_reset_ops;