From patchwork Thu Mar 21 07:08:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Shao X-Patchwork-Id: 13598427 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 61324C54E58 for ; Thu, 21 Mar 2024 07:10:01 +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=cODX4LaS5mFqYLF+Us2MQMmlZvbMIlmL0tKT2Rkq5yU=; b=hq63ukSUwScC3R joJStAhHK8466fOjrixX9+Y5mfWjsZq6IZ9oFKRIbFSn7+qwwqfLzTcce1yfMbftEX1G6dA4jIlfv 7K0ajxGbpvRyM+q+gqL1DLmlHEFDJTnGJn8F4xYZePSbZLawysfP6qlY1Md5PsGmAmBKh7tlDQsDH PvLX72EVgjwttdQpD3TM5o+hjs1RLo+X2BAMMeT4vvM/6e/TD/h77z8Dxk8kvlWfnIw4O1nsqtl/m vd40TshaqL+gnUE1iNGZuxAb0cccRjJLcXg6+TnFs18T9DnpFCVKrqUkVIa6Hq3iLq6zQWCS8oFGw YLnGLYsUS32/jNgeRtJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnCYh-000000028Fv-3dR8; Thu, 21 Mar 2024 07:09:51 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnCYf-000000028Ea-0RPW for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2024 07:09:50 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1dff837d674so4999395ad.3 for ; Thu, 21 Mar 2024 00:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1711004988; x=1711609788; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dRY0pVFx5hvWyvGusyC9aLcoBfDJnjCMV4j0O5N7/aM=; b=LKl1NVa+Nq1w5PjL8x8lWWJurYyFiTcrorlpBAKSCKxhYMX5Zk+bMjUdpZbhZpdDRk D7ZnuN8fiJ/7IVZOYz44f2Hs+KhZ3WicYaVgQCijy4/+FeAE1QrZalXXyZqiv+71CsMM sgSZ24KouYVXr9n4VlYzVdu0pB6PIl4250XpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711004988; x=1711609788; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dRY0pVFx5hvWyvGusyC9aLcoBfDJnjCMV4j0O5N7/aM=; b=VE3wJR+lX5RVLpJ0OVDx2vv4hKPYMP9IU/rKH0qlCuLwmRMm7LYLqWJhODX6gGuGYC 2ZclB3spzuqYnSCyTNiTqwTcPaaCxg6m4To+Sm5xn7SPpszpna6DCxOyNF9h6J0Rosvz 5GHw0COlSE+/rpr14GFsnYn5jStc+t+dpTssqZ6114P+xhmt442diiaSHRqpEhqz5KGo 22/DEtcX6sKCnN8CndyhgQjL8yLFM6k6JYXVMkKxe4w7jrRamihXHVa5ia3RUn4FY08O 61wg3jVIbjLXq209q2rDvxQ8FiJxiPJlPELmgP52RdPsNoD2Nw8de1ep5cRe0DE5AWsz Izew== X-Forwarded-Encrypted: i=1; AJvYcCXyCvYihpOyAN0PweMJTlcMpxr0OXxSups6rEabmxrFXitpqk1dyxZBWGMDus/Mn1lbA1GmQqzYbg78Qo6fl0FHFw6V5RbKRA/Rl6LEIQSwBxBMvOk= X-Gm-Message-State: AOJu0Yy9dFMHmcHroRyIU/sRUPQNsgpvOindhXUiLQg3T+AKM0uKspmu 5hGx+Ww0IW5pJGOnHzImjpjMfRFwhcahKi5MXL3hSSt1oxfEMS8uFkcemdACpw== X-Google-Smtp-Source: AGHT+IH57yxJiEyp3oRKr8txV8M/DfsK8WHQOpuCYRXilXXDGc8rC+frhVE/5DbrWBUAwhTudJ3yqg== X-Received: by 2002:a17:903:13c7:b0:1e0:11a4:30e0 with SMTP id kd7-20020a17090313c700b001e011a430e0mr5267687plb.19.1711004988238; Thu, 21 Mar 2024 00:09:48 -0700 (PDT) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:c1ff:a4cf:ac35:8df6]) by smtp.gmail.com with ESMTPSA id o1-20020a170902d4c100b001dbcfb4766csm8705582plg.226.2024.03.21.00.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:09:47 -0700 (PDT) From: Fei Shao To: Mark Brown , AngeloGioacchino Del Regno Cc: Fei Shao , Daniel Kurtz , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-spi@vger.kernel.org Subject: [PATCH v2 0/2] Fixes NULL pointer access in spi-mt65xx.c Date: Thu, 21 Mar 2024 15:08:56 +0800 Message-ID: <20240321070942.1587146-1-fshao@chromium.org> X-Mailer: git-send-email 2.44.0.396.g6e790dbe36-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240321_000949_197316_4AD6EDFD X-CRM114-Status: GOOD ( 13.00 ) 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 Hi, This series contains two patches for spi-mt65xx.c, both focusing on its interrupt handler mtk_spi_interrupt(). The first patch is to fix a NULL pointer access in the interrupt handler, which is first found on a MT8186 Chromebook device when the system tries to establish host communication with its embedded controller. The second one is a decorative clean-up when I'm working on the first patch, which simply renames a variable to better follow the rest of the code. I put this after the first fix because I think that will make maintainers and users slightly easier to only backport the fix if needed. Looking forward to any feedback, thank you. Regards, Fei Changes in v2: - Restore a missing curly brace being dropped during rebase - Fix a typo in commit message (trans, not xfer) Fei Shao (2): spi: spi-mt65xx: Fix NULL pointer access in interrupt handler spi: spi-mt65xx: Rename a variable in interrupt handler drivers/spi/spi-mt65xx.c | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-)