Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3019028rwb; Mon, 15 Aug 2022 16:15:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6jn2NSG4KJqEDg2YSLhwLdchgRFyeIF9RNefO0+W9K3jo0+ncRFG2PqAlkNSOxJa8LfQs/ X-Received: by 2002:a05:6402:5002:b0:444:26fd:d341 with SMTP id p2-20020a056402500200b0044426fdd341mr795448eda.351.1660605352714; Mon, 15 Aug 2022 16:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605352; cv=none; d=google.com; s=arc-20160816; b=llL8lcnAkHiVo3vDARENXD8WqZfzW8BiuznpFqVYHqO8yMA4pYbzQNzgoKOmMadnE8 f+srCPAyVtnsql3wILLDeYWSr7rkAcVtR21H5Vk00Byalo1R3u+KDNA4h843W1TnnGvY 5aBVAkLvBcgWmU+P0nkY7p1Ay8VA1wtODKiXkn/22GnOuwerzuVgGyzn2JvUAsubUOwT 2UYqzxZ9wRcU+xnC/30ynQGmBgZ8qWA1i/YzCeF/DK5uJSfZKbAQ0y5DKYw4EvT02+hc 1itl6E2J14VwHtHLzgEG007YHZmSORwfy8h7maHOY/rqk0Dy/bCHs11EaDxJlTmH81x/ 8qBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c0vvf5rIxRQZqD/pHUJPSsAI/K6GEh0pnQFKMpKsOG8=; b=QXnjm3bWJLAGTyW7ILd3TxVsfLXBOxgidKzX7B5rvHdBklSjc2ataCloX65aPcMN4h yHLxUJKNJ8cVzu9ow8SY8JtJ9P1Wmuajj/9Sp+/e2pnqJCNt1YGMKE3saD5B5QN1tS9n Al8IMdA2KT1PNIOxqVHB1nYt8anwi4xYx3iwG3l65nQ7Wpdd8LmMBeVW/1Mfvw8REQZr MYlvBJDU+jlG5ULK52zgcB3zFIuOXmYEp5YEnC/7L6dFWCWyg6fX0u/dUmeVb0HPzSUO Zjl9gNmS+JxsSyu2MemDady3FQkdiEVX/NyiKg8BAWGbSP2ctvNjj+VnLlRuAZjQUtGi WbMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PqChKhPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ww13-20020a170907084d00b007317756bc04si10507456ejb.1006.2022.08.15.16.15.26; Mon, 15 Aug 2022 16:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PqChKhPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243489AbiHOU62 (ORCPT + 99 others); Mon, 15 Aug 2022 16:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347024AbiHOU4N (ORCPT ); Mon, 15 Aug 2022 16:56:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA3134F1AD; Mon, 15 Aug 2022 12:11:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 470AD60693; Mon, 15 Aug 2022 19:11:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51967C433C1; Mon, 15 Aug 2022 19:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590717; bh=zfIZ+r3tJPCB2oToX0Vxr7pLYk/MjTYFsb8+1JVJSZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PqChKhPQ35WExOwi5LtjIPShv6SdSYClI4o05YcnsuRC2+xvCWVb9sgU4WG5A0yaF kCknJe2dusXOkfX8jTWvvyloqNfedy0JVV27vNx1ALIGWWLj11ufLPUoNbaS0LjZJl 8bk7NAH9f+HhTJ8buDNZgi7oz5VxsYj9GezxgfLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.18 0348/1095] media: camss: csid: fix wrong size passed to devm_kmalloc_array() Date: Mon, 15 Aug 2022 19:55:47 +0200 Message-Id: <20220815180444.171369033@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit 4c25384d136642d72098e36201ca988533e73065 ] 'supplies' is a pointer, the real size of struct regulator_bulk_data should be pass to devm_kmalloc_array(). Fixes: 0d8140179715 ("media: camss: Add regulator_bulk support") Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/qcom/camss/camss-csid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c index f993f349b66b..80628801cf09 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.c +++ b/drivers/media/platform/qcom/camss/camss-csid.c @@ -666,7 +666,7 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid, if (csid->num_supplies) { csid->supplies = devm_kmalloc_array(camss->dev, csid->num_supplies, - sizeof(csid->supplies), + sizeof(*csid->supplies), GFP_KERNEL); if (!csid->supplies) return -ENOMEM; -- 2.35.1