From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 352D8C33CAF for ; Thu, 16 Jan 2020 17:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0048824683 for ; Thu, 16 Jan 2020 17:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579195976; bh=QdMW2kKzzllS66yGtVupplNZIsmkuAM6v3Xfb1vGkmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mYQP0VjcR3bFR2VI4n42nv1qUVmJ7WKtCXPmvdE+aInDqS8iFVY5XCb8Xx4J5T+kF PXTKB4brp3s1u8RqiDxSFCKFlCCuBxfJmmCsn07czvBZyz6BJjzsOXDVkhjyXHOhpU TCRdlVWRopAI9YLCy4ni9NTsB4TN6r3f9fooIiTo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404756AbgAPRcz (ORCPT ); Thu, 16 Jan 2020 12:32:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:43632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404620AbgAPRaq (ORCPT ); Thu, 16 Jan 2020 12:30:46 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A21FB24699; Thu, 16 Jan 2020 17:30:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579195846; bh=QdMW2kKzzllS66yGtVupplNZIsmkuAM6v3Xfb1vGkmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i2mnCDlMccJtre8oSsjDNdxGUqgtD8nWzY86AmIFL4WMcb2h7J1xAmBBnJBQiAioq cnkGtHmTawLJvfU40WiIQ8T8097YQ/v0x+RZbPQ6gIrqZ8knygHyKiPue72j0yZgxQ LanruCFV+OHQbncvCLk6FEAEsi6sXD/3vMY5trnU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stephan Gerhold , Linus Walleij , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 4.14 347/371] regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id Date: Thu, 16 Jan 2020 12:23:39 -0500 Message-Id: <20200116172403.18149-290-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116172403.18149-1-sashal@kernel.org> References: <20200116172403.18149-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephan Gerhold [ Upstream commit 458ea3ad033fc86e291712ce50cbe60c3428cf30 ] Those regulators are not actually supported by the AB8500 regulator driver. There is no ab8500_regulator_info for them and no entry in ab8505_regulator_match. As such, they cannot be registered successfully, and looking them up in ab8505_regulator_match causes an out-of-bounds array read. Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505") Cc: Linus Walleij Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20191106173125.14496-2-stephan@gerhold.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- include/linux/regulator/ab8500.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 260c4aa1d976..3f6b8b9ef49d 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -43,8 +43,6 @@ enum ab8505_regulator_id { AB8505_LDO_ANAMIC2, AB8505_LDO_AUX8, AB8505_LDO_ANA, - AB8505_SYSCLKREQ_2, - AB8505_SYSCLKREQ_4, AB8505_NUM_REGULATORS, }; -- 2.20.1