From patchwork Thu Mar 21 06:41:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Shao X-Patchwork-Id: 13598423 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 17E27C54E58 for ; Thu, 21 Mar 2024 06:49:40 +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=w4uOqMIEWIvcMUjteI0sXfjYhH6rMiDn0AB/LVhiX1c=; b=2ZlYAI40KTW6D+ lJDmrREaiQXfNWJdzdB2Y891Jg8k3FlAiyBMSbYoVRTB4j2u4syopue+7dwGyH5ZgFJ4gNEiCL1+b 0NP25a9buqjayxoo4unKgh/fqTSXYFMXIKo+3uwf+ewq9O6pizu3NjqEPCCMTKBDvilWmVoFsuO9Z 5xrglAljq2K5eNiC1gt7WuHlje1w0gONu3TRx0QWD30FZ8s/JzVO+k2krUW6vAL+Me+802L2QQFOY bwiWFQOJQ7DjkE9b59t3A14HLqUc2QIbe0VvMksLL3HpyHprnzLxmrwfwXRpFA3UbmGTrE4j5e84+ C8EHxanXuZHzb1yjZszQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnCEy-0000000259M-2jWn; Thu, 21 Mar 2024 06:49:28 +0000 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnCEu-0000000256c-2wcN for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2024 06:49:26 +0000 Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-78a26aaefc8so44981085a.1 for ; Wed, 20 Mar 2024 23:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1711003761; x=1711608561; 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=XtvNQiaw+2/IaxnmzdGoLxqPTPX+iJkSvUz6nFXt6OU=; b=VpCESJlhZXFVZf4f3uGpvl2CTCMnqjVMAA1A69NE8HYmklkpdfjcYGSd6GaTGPi0ka tVJYYxN6e9h1uVutxj3s8DkYwAbj09AbMzFU3k9A+EYh06nUH6zEzUOfnKjCN2mVizPg RWIaIHVovYtkK8iDMNAdHzyRNByQUTGxC9RUg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711003761; x=1711608561; 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=XtvNQiaw+2/IaxnmzdGoLxqPTPX+iJkSvUz6nFXt6OU=; b=ZZc4U6gGT8end6xyA1cePMuEotSL11eVIgm+27JX2o4x78O1qwM/G6e5+PtlaKsxd3 3DmlLf11dPanwg70SeqVRJwrvK8no/5quZ2fSXUULRTfkTjnuR56wAuceeZQeCzqf6vd p0GpaUcN99LzZCF30x8h9VYIZErUTbats+cgfQCjGG3TttLwEGyZbowatQCbUMiLKb8f 7G2g1VlLZpwRi+KVT0olJNdNfzNSAUdH9ahpXE9FJsdVXTAAsc6+/nbXbzIvc2cx+UH3 3urB6IoywIR3H3Of70nEwadCyYNf8aipC6IAGFAeqN9QkhsOG5Pjnb80sp9L2LZzVZ1s n9ew== X-Forwarded-Encrypted: i=1; AJvYcCVj+nEefg6w6PRK6DcesJnNCRQLQ1zwRTZ4kvdD7OQCHFl5AIaNAtEkYv1BbYKFBHRLEZ6QO0qLoHLlmeU6eBix4m4uY0pkiZoBdBt/9ZSforwTfY4= X-Gm-Message-State: AOJu0YwgBfEVWmCOzLoH1NmPWaLMmlIaPlPvD23AW6LfB/L60bP88ebv EcrrBxIZzXQRZxzlf0IXN0ivd6TTEIaWymY0R6JHu+xuH4qIqKeY5e85k/DvfL34KeWDOFtKGmE = X-Google-Smtp-Source: AGHT+IHWd5hWPmT05m/dMO6abQe1VIjaPIiKOk2TwZu/GsKoXdSkfitV4XwZzfzNFOrPnEs3/o8wrg== X-Received: by 2002:a05:6a20:4907:b0:1a3:4469:5967 with SMTP id ft7-20020a056a20490700b001a344695967mr7091773pzb.57.1711003407287; Wed, 20 Mar 2024 23:43:27 -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 lb3-20020a056a004f0300b006e664031f10sm12874938pfb.51.2024.03.20.23.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 23:43:26 -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 0/2] Fixes NULL pointer access in spi-mt65xx.c Date: Thu, 21 Mar 2024 14:41:00 +0800 Message-ID: <20240321064313.1385316-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-20240320_234924_823723_335155FA 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 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 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 | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-)