From patchwork Thu Feb 16 17:57:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 13143587 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 50FF9C636CC for ; Thu, 16 Feb 2023 17:58:50 +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:Content-ID:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=C/JeapddpSUfjwY4AGClM6S3Trxq451BdOFN9Yde4aQ=; b=UL741BWD6TAC1l CxleIX0V3lEE1kaAwHTvVUH8koExIO4PpzgBlnGhmGjE9lUlg8XGpo4vAn3+8pa+Rn9oGhZuTh7VM vktYsVFNtcO/w8KSXSytAjoOv4PG6DvAnSnp2S1cfF5gsebVzuhTtDOwLE70Jxe87g3nihyS1xjAF gN/aEuSc3pTO1LQ5qTIwn/EclsUB2vRcJQoO9W4cAGYPDFoVtJ1rvotOBY2OIOpIiLBG3BSAkKESL vnxeZxyE16GMOzGaKmSIgDSNjIhnU2QTyLgg04So/f7eEwil1ZmoEr/8rfTpA3nedAX9t3RoK/ZaM n+wVq/zmNt5Yu8KyTFjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSiVx-00BPa7-OQ; Thu, 16 Feb 2023 17:57:49 +0000 Received: from mx.sberdevices.ru ([45.89.227.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSiVs-00BPWq-LF; Thu, 16 Feb 2023 17:57:46 +0000 Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 8E9FD5FD10; Thu, 16 Feb 2023 20:57:35 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1676570255; bh=SduSeqOwVL90O9MEgDTlHkV2YuE15AjLaWPjyDCCbvQ=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=kFmCVb1rxHNm8v5I0wrODLKy6oWi5DrJVjX3n8ylfuqC+mgu2vSVFodi/xRTa5lY4 2fT6+47r/IzlJvv4YbX0jwJPTGo+9JPMORi3+eEaFqLqsYoHSvI+1FFQuTwGwV3naM hV01t8DBIQdoZW6ecsJ5hb8hDZQzzwLB+YWdvr0bkxhrlwCdwYJ/+o79NxK1YyVgas jiD85t+P389oy8WjJo8IpxT7Rh7SCr0ul22l57qP9lrmTdzifKHrA3PioaTya0H24+ id7ng3Sqjty+eEOzpb0vrzy9oZNg+LiZ+iYI/aA8ONo3aVsoQrsSyO65BazcTQZt90 jNh5GZjJ2pAKw== Received: from S-MS-EXCH02.sberdevices.ru (S-MS-EXCH02.sberdevices.ru [172.16.1.5]) by mx.sberdevices.ru (Postfix) with ESMTP; Thu, 16 Feb 2023 20:57:32 +0300 (MSK) From: =?utf-8?b?0JrRgNCw0YHQvdC+0LIg0JDRgNGB0LXQvdC40Lk=?= To: Liang Yang , Miquel Raynal , Richard Weinberger , "Vignesh Raghavendra" , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , =?utf-8?b?0Jo=?= =?utf-8?b?0YDQsNGB0L3QvtCyINCQ0YDRgdC10L3QuNC5?= , Krasnov Arseniy CC: "linux-mtd@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linux-amlogic@lists.infradead.org" , "linux-kernel@vger.kernel.org" , kernel Subject: [PATCH] mtd: rawnand: meson: initialize struct with zeroes Thread-Topic: [PATCH] mtd: rawnand: meson: initialize struct with zeroes Thread-Index: AQHZQjAk8W+Ow1LN4Uavv419Ihk4sA== Date: Thu, 16 Feb 2023 17:57:32 +0000 Message-ID: <8881a365-e218-916a-e68d-d889797279be@sberdevices.ru> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-ID: <67C80C4B08BF6441AA617A43FDA00DA0@sberdevices.ru> MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/02/16 08:39:00 #20868660 X-KSMG-AntiVirus-Status: Clean, skipped X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_095745_447947_18A627C0 X-CRM114-Status: GOOD ( 11.48 ) 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 This structure must be zeroed, because it's field 'hw->core' is used as 'parent' in 'clk_core_fill_parent_index()', but it will be uninitialized. The following backtrace is result of the dereference of such pointer: [ 1.081319] __clk_register+0x414/0x820 [ 1.085113] devm_clk_register+0x64/0xd0 [ 1.088995] meson_nfc_probe+0x258/0x6ec [ 1.092875] platform_probe+0x70/0xf0 [ 1.096498] really_probe+0xc8/0x3e0 [ 1.100034] __driver_probe_device+0x84/0x190 [ 1.104346] driver_probe_device+0x44/0x120 [ 1.108487] __driver_attach+0xb4/0x220 [ 1.112282] bus_for_each_dev+0x78/0xd0 [ 1.116077] driver_attach+0x2c/0x40 [ 1.119613] bus_add_driver+0x184/0x240 [ 1.123408] driver_register+0x80/0x140 [ 1.127203] __platform_driver_register+0x30/0x40 [ 1.131860] meson_nfc_driver_init+0x24/0x30 Signed-off-by: Arseniy Krasnov --- drivers/mtd/nand/raw/meson_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c index 5ee01231ac4c..30e326adabfc 100644 --- a/drivers/mtd/nand/raw/meson_nand.c +++ b/drivers/mtd/nand/raw/meson_nand.c @@ -991,7 +991,7 @@ static const struct mtd_ooblayout_ops meson_ooblayout_ops = { static int meson_nfc_clk_init(struct meson_nfc *nfc) { - struct clk_parent_data nfc_divider_parent_data[1]; + struct clk_parent_data nfc_divider_parent_data[1] = {0}; struct clk_init_data init = {0}; int ret;