Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2568071lkm; Mon, 20 Sep 2021 18:56:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz+iD0TOfxJCjHHxKtCVdO3Ue4BDrEt3U1FmeGN2TWRickP++5VExsJAJjHAkRM7MbIKDw X-Received: by 2002:a5d:8b17:: with SMTP id k23mr21305853ion.17.1632188882142; Mon, 20 Sep 2021 18:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188882; cv=none; d=google.com; s=arc-20160816; b=e34Nf5fK6pyR5n4io5ZzIEdS7W39SQoX0huX+tgDVFIduNZX6XRP0hNZFIg0CM6joy TWM9kAsNfOE0sg/mGPC1RbVouJ7h6Vf4WD9OvK0webm6crxYFpjLmiW2jURjs94NYci1 g47HoHx9Fjemzr1ufoxBATl3El8cVrVkN/BrqtOgAz/6kDxXBbiDbJxP3o16PKjN8cvx tmzxvPXoAnUWw4+xJEfaDbnZxaoBGGb5rLT7vFNxCcVndx6/R0BjO8HseZNQm9r7lM5t P4nggpyZCuB17u8RmXfSUk26bvM6eUop5nWhzFiMbpG+ACtm+kPrgcLBkRFfGW2QTz1H PUpQ== 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=8LHKbjawSDeP3ZnXr4dYrK08FPgoD9QFD9jZ3+Nf3Hk=; b=PUf38k3ry8N0ThekPeNBwp6c7fdXEcEZLJ483cVU5AEkmtITNvpfpWMLQycuUPIo5e ZHSFkmUn3GclokchBbgqhtthrtO9KQWE0a1FeT208WNNDSCCluQr8zKGMs/kvL7V3ANo gsB2gCvJc2NYWw9f1z3jE5lrbtc3ls+Uzn22B2fWs2Zys8V93r5xzYKvPvtBAQnT4L2F n18dq0Gpr0glm1Gp3Z01oVho61bPuSCXQNCuw94WEy+iQf47xEW7sY7m9qtepo8gqAU4 H7aePmbaeNPdD46m0MSJTzCWqLd80QBMgBqDSAQCdiUhL++z08ASjRIr0esyHBXXWZJq 8TcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yhnkmo0n; 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 q14si13058909iot.14.2021.09.20.18.47.51; Mon, 20 Sep 2021 18:48:02 -0700 (PDT) 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=yhnkmo0n; 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 S1343686AbhITRiG (ORCPT + 99 others); Mon, 20 Sep 2021 13:38:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:42622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346930AbhITRfz (ORCPT ); Mon, 20 Sep 2021 13:35:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF39761B26; Mon, 20 Sep 2021 17:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157581; bh=dJl91C0/eX+mQIGkNEJEiZiVrhcnNqrdebm1P6xLDPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yhnkmo0nZEtqqJ6J8+RPTSmibwox3grNSWMuCZ6+NP9W8y53AguVnDCC8dwoV4fEv aUcTqz/iUWYFj59Zfnj633OvS61EPCcNOeCF4KsXsRfZIoFwulwOAb/1WPLrQPyxLQ 7c0WvQIqflX0O5isttFB0Xn1abiuxpWbTR/7NqD4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Purna Chandra Mandal , Peter Ujfalusi , Vinod Koul , Tony Lindgren , Mark Brown , Sasha Levin Subject: [PATCH 4.19 056/293] spi: spi-pic32: Fix issue with uninitialized dma_slave_config Date: Mon, 20 Sep 2021 18:40:18 +0200 Message-Id: <20210920163935.177054984@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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: Tony Lindgren [ Upstream commit 976c1de1de147bb7f4e0d87482f375221c05aeaf ] Depending on the DMA driver being used, the struct dma_slave_config may need to be initialized to zero for the unused data. For example, we have three DMA drivers using src_port_window_size and dst_port_window_size. If these are left uninitialized, it can cause DMA failures. For spi-pic32, this is probably not currently an issue but is still good to fix though. Fixes: 1bcb9f8ceb67 ("spi: spi-pic32: Add PIC32 SPI master driver") Cc: Purna Chandra Mandal Cc: Peter Ujfalusi Cc: Vinod Koul Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210810081727.19491-2-tony@atomide.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-pic32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-pic32.c b/drivers/spi/spi-pic32.c index 661a40c653e9..d8cdb13ce3e4 100644 --- a/drivers/spi/spi-pic32.c +++ b/drivers/spi/spi-pic32.c @@ -369,6 +369,7 @@ static int pic32_spi_dma_config(struct pic32_spi *pic32s, u32 dma_width) struct dma_slave_config cfg; int ret; + memset(&cfg, 0, sizeof(cfg)); cfg.device_fc = true; cfg.src_addr = pic32s->dma_base + buf_offset; cfg.dst_addr = pic32s->dma_base + buf_offset; -- 2.30.2