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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 1AB24C2D0DB for ; Wed, 22 Jan 2020 09:45:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC32824689 for ; Wed, 22 Jan 2020 09:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579686358; bh=uekGNvBbb8iL4au83+tOTlq3z6PxAJJO3z4muAo2nhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nb5HjpctYxjuAJj0gEsSidssvDqfL5HgA17B7hnVfMs5+jQJJc7xsteqLuKrRlMdp UyuDy8nSsA7d+P12xYpVs4eV40St8X4htP45n50nXHbhXQO6tzFrvZxm8yZ6FQqTLZ bRMKwE4snB+Oeq9qUlhxxwZudS5ZzM0h71mIXZYM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731519AbgAVJp5 (ORCPT ); Wed, 22 Jan 2020 04:45:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:37430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388025AbgAVJoV (ORCPT ); Wed, 22 Jan 2020 04:44:21 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 598CA24689; Wed, 22 Jan 2020 09:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579686260; bh=uekGNvBbb8iL4au83+tOTlq3z6PxAJJO3z4muAo2nhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y7AbrtVr0bBU/YpvANACtBIJKYyGlrKUC2yRjM3J4yicVa7l3vEq2wv7Lj+u/nxlJ l6esthmcGzpi5HxOJTEocy2HXNAF9UpvTZovjL6S4UVHfjszzXq03wXqIGd8brOwWZ Q3lfpzhTYNe0X0VlCV0sYSp8rauznvAApcf9V1uo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Stephan Gerhold , Mark Brown Subject: [PATCH 4.19 102/103] regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id Date: Wed, 22 Jan 2020 10:29:58 +0100 Message-Id: <20200122092816.938064051@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092803.587683021@linuxfoundation.org> References: <20200122092803.587683021@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 commit 458ea3ad033fc86e291712ce50cbe60c3428cf30 upstream. 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: Greg Kroah-Hartman --- include/linux/regulator/ab8500.h | 2 -- 1 file changed, 2 deletions(-) --- 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, };