Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1100809lqj; Mon, 3 Jun 2024 10:05:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUh6TlOPLiVyxHiSDUujGjLQ34OyJwzx88HTe+40rzamyGARPtAE+ndtOwu/Ue8rS4peaV8Jt1oVYE0VI+BW5b+dTMxKDJ6JZNlvo91SA== X-Google-Smtp-Source: AGHT+IF3IpTYw7Yt1jSwNRmsVPqIkYIb9PnmNsD1lgYqCRdud1uoMYJK68OwaWql+MzS2gv5J73x X-Received: by 2002:a05:6512:2391:b0:52b:8aa1:bdca with SMTP id 2adb3069b0e04-52b8aa1be8emr9995840e87.49.1717434349817; Mon, 03 Jun 2024 10:05:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717434349; cv=pass; d=google.com; s=arc-20160816; b=sILp5sSDmJlFhl9D/tSVsgIXda2ER8e5vs48Sb5taPExsLEYSGO3Hw2qIvcOQ41wpY nQ7vMgSA26LmrycAGfasCZAaaVfnLMmHI59xc2Nsi8uQOtB9D3JwVyHakUsM+LPAUGtu eAhM5fIPYBcI1PDUlKA2T/NUCAJlp8hS0VB9nSsPhiRg1W/jIIXYPmC5TpOzvrQdSCCR 9yOUVbbbhr2p4Yu3E4v0obWCn6RK9KeXVKeMkMx38pH91hCbVosSkOeqgZlIyaQMurly 3gPBpZgbq9zxWTAhgiqEwVA6sHqfpg7ftqGHfATlDsH+8Hqjsvqsioh5wl+svrrszGlq eyTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8V5Xf3/VR+kQfLyRU2laXgJnvd1caoydMEx26Tdx9TQ=; fh=ynLsMpR9ueP1VmemMtclw0WA1ivatZ60W7fkpnpjhvY=; b=hRaqnCbtKM99ms5+TNCLVTr5StNimtcJWcmFQJho/Yki4MeyPWfc9OGYzL8i2P/WQT w06yYp8wpHGgwVSSkcjwoed28mVfwacw4Og0YQEtDIWPzlM89WLEA+2RTMZH/N0lX6zc WCdIcChWB/5bdtJ+ml+qb7ALuH1u53AA7vqVZ5OeUdRlIaWBi3rvejz38aX4v9pUS42d ebZU8n3x9sEn92wX+8BswmmbMqkkRuaukPBppPRqyDJAbfIBbeVfYBmruPSRWUYOk74N zLAywcXRc6OIPm8+eMT2OhQaFA6fTpIyPfoaULELEPAHD7ydWcNksbmJ9aSNcDkttxJF qCSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WrMvdP8A; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-199482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68a127ed39si320125366b.461.2024.06.03.10.05.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 10:05:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WrMvdP8A; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-199482-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F378F1F22E54 for ; Mon, 3 Jun 2024 17:05:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99680136E34; Mon, 3 Jun 2024 17:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="WrMvdP8A" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E9FF135A6F for ; Mon, 3 Jun 2024 17:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717434337; cv=none; b=fKV62ZWhqlRR5HODLBANJHAVXUrngpH45M2yGL2sEbh+CTDNI4fGuzxgDDpYpbYE24um24HqQ1fTC54y2LBF33qWC+Lv7Gb6qJnnj8+uU/eyUAPrQu8Q1JkfzAU7N1BF3nMIjZs0m2cTk8uZk8/zZDhiy9lKBZLAnWapQa8JE2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717434337; c=relaxed/simple; bh=jAih5F90EVVgJcWXk40LnZSRKdJAkb6zUSgJE8ry8Xk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Hie4du1Ld5xU36J7pzDqCV2QgkSLdE2dZ8NHuvIl+3L3vu6hkjupFox8fN41SN89j/yc1uhRYx0omxb+iMF64aSRh+UTRwArA91GVW3RF+v8RqeRtD6ofw6a1B01FQSJEYh4aCtOKzlbxVCAqGHncx+H+46DN9gbNUDMyOhdY8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=WrMvdP8A; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 453H5Tco110827; Mon, 3 Jun 2024 12:05:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717434329; bh=8V5Xf3/VR+kQfLyRU2laXgJnvd1caoydMEx26Tdx9TQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=WrMvdP8Af8rfYjhlMGvKKbvxs1DxRHGMbFvaaHCKASaJYWat2pJ9PIlYpw3fNahqX caf5L4VwcBlBj+9RzWjpTXSSmyxvMkNwlhit4Ttaq/vCHxPc/zmVI6pyHRELcKcruI /qC4kV+WKF47ODiEUqdfHeRG73ID2iYR6f3QkgKY= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 453H5TJ3039134 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Jun 2024 12:05:29 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 3 Jun 2024 12:05:29 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 3 Jun 2024 12:05:29 -0500 Received: from shree-udc0509427.dhcp.ti.com (shree-udc0509427.dhcp.ti.com [128.247.29.227]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 453H5Snp103813; Mon, 3 Jun 2024 12:05:29 -0500 From: Shree Ramamoorthy To: , CC: , , , , , , Shree Ramamoorthy Subject: [PATCH v1 1/1] Correct nr_types assignment for TPS6594/3 and TPS65224 Date: Mon, 3 Jun 2024 12:05:24 -0500 Message-ID: <20240603170524.643010-2-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240603170524.643010-1-s-ramamoorthy@ti.com> References: <20240603170524.643010-1-s-ramamoorthy@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Swap nr_types assignment for TPS6594/3 and TPS65224. Issue detected with v6.10-rc1 and tested using a TI J7200 EVM board. Log: [ 13.974024] Call trace: [ 13.974025] _regulator_put.part.0+0x40/0x48 [ 13.974028] regulator_register+0x2b0/0xa00 [ 13.974031] devm_regulator_register+0x58/0xa0 [ 13.974035] tps6594_regulator_probe+0x4e0/0x5f0 [tps6594_regulator] ... [ 13.974178] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 Signed-off-by: Shree Ramamoorthy --- drivers/regulator/tps6594-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c index 4a859f4c0f83..b66608ab2546 100644 --- a/drivers/regulator/tps6594-regulator.c +++ b/drivers/regulator/tps6594-regulator.c @@ -660,11 +660,11 @@ static int tps6594_regulator_probe(struct platform_device *pdev) } else if (tps->chip_id == TPS65224) { nr_buck = ARRAY_SIZE(tps65224_buck_regs); nr_ldo = ARRAY_SIZE(tps65224_ldo_regs); - nr_types = REGS_INT_NB; + nr_types = TPS65224_REGS_INT_NB; } else { nr_buck = ARRAY_SIZE(buck_regs); nr_ldo = ARRAY_SIZE(tps6594_ldo_regs); - nr_types = TPS65224_REGS_INT_NB; + nr_types = REGS_INT_NB; } reg_irq_nb = nr_types * (nr_buck + nr_ldo); --