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 CC2BCC33CAF for ; Thu, 16 Jan 2020 19:24:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B2D42073A for ; Thu, 16 Jan 2020 19:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579202652; bh=r9Ny1NmrJ44xIrdA3H/UUfVyCoCXphiEt47Z1mkQlOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mWl461USFZbBUU3dJLaPyp455eDmmo0JbHXudC4Zed7q1xKQ6ltG4+olrQXHTcKVj v9945t3OYWpJhEqAEqdjBdQmhNyqNE++DCB/1Lk+sKLlWuxz7wwfF79mnJks9A+b5F OK3dbLbOSyq9VWhB1ilwp1/B2wcM2EvL6/qPrlJw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730538AbgAPQwy (ORCPT ); Thu, 16 Jan 2020 11:52:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:36020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730358AbgAPQwq (ORCPT ); Thu, 16 Jan 2020 11:52: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 7899F2081E; Thu, 16 Jan 2020 16:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579193566; bh=r9Ny1NmrJ44xIrdA3H/UUfVyCoCXphiEt47Z1mkQlOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wzejHrsSiOGr8J8DPP4jW9uOi+/u8So9rxxp9OGSrgYMnHt0mPiY/si+ZdJ+pWlcn VNgBRJITlnZNnWo2eEJoHJWW5CPsp7tNShYSe2RIF2ktBcS0CpoBdF9uopCFTtZrd8 qYfz0Afczn4cl+CP3cOjmzS0UnKlP4D3711PHQVM= 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 5.4 110/205] regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id Date: Thu, 16 Jan 2020 11:41:25 -0500 Message-Id: <20200116164300.6705-110-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116164300.6705-1-sashal@kernel.org> References: <20200116164300.6705-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 505e94a6e3e8..3ab1ddf151a2 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -42,8 +42,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