Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087702rwb; Mon, 15 Aug 2022 17:49:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR6BNTbJtXSy2dCWGQrj5Wqo/i4fAqFUkUMyjGY60J9pWCmqp+XGAb3DA9fjpr2Mlr371fRq X-Received: by 2002:a05:6402:3552:b0:43d:a634:3997 with SMTP id f18-20020a056402355200b0043da6343997mr16444170edd.389.1660610985802; Mon, 15 Aug 2022 17:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610985; cv=none; d=google.com; s=arc-20160816; b=Z++OB+/dWE8xmrsl3CdCJ3JoOTGGzCLtb9korJm7PrUYl043oyokXRLFUjiysqgErr xuepD5/VJJl+S4g3PJ8i8vLVN6X/sjnUTeRDwlWAhKqVXiqwRtwyyggxAtvjeTUilV00 CZIUBp7vNFiHdKW6wAd0zA0uVHY9xUceWhlbsAXJQbkwKA99DlKG9g/HfyTMlXAtPIGX OZRI6si1updXcfHAxHqd+lkReApNUnnUMeiIDuQRHMaNOliSPRtcjDUMZJ93B7cra4fF K/RjKbC5tdDnGmmYPzGw3hP+TSFJ3FfKtIRXZ4OusXDCWxvbPbyRkC8yX+OO3MtuVWeu ge3w== 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=eUC75fZF7d9At/UhAbrppPumoXlPXxVGboeK2DhL1rOBvxrJU4PYZ2UR7tEpmnkxsa XZBbncdGR5bYwBY8it3kHGu4iLvNtfX82wOrRUJuQ4mV5MmVRa30IVbb6PgYZlKr3aEu cvR1pgpRtn967gxEuJE19KNxGoNBO2mi2lUC5NHzj0wZcUhrK4f0ZFcWerucaAKwAwgf ZY+bREI/kjxc7r/BBl66XdM/f/spmNYhB9IrFqk2ZX+ah9SW/tIzuEzZAxhwwGy5DNJw Z6bc/Kk/1IZNfibEngtjmLconPO6yGkCuiPdY2BiA4Jqqa4S6S/FNRfOZYvYbJoVcHsq 4CEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QVjB2uwU; 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 go35-20020a1709070da300b0072f5fa16193si10627350ejc.254.2022.08.15.17.49.20; Mon, 15 Aug 2022 17:49:45 -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=QVjB2uwU; 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 S1353650AbiHOXft (ORCPT + 99 others); Mon, 15 Aug 2022 19:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353355AbiHOXbh (ORCPT ); Mon, 15 Aug 2022 19:31:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50ADD14F961; Mon, 15 Aug 2022 13:08:11 -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 86FF160DEB; Mon, 15 Aug 2022 20:08:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A72C433D7; Mon, 15 Aug 2022 20:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594089; bh=zfIZ+r3tJPCB2oToX0Vxr7pLYk/MjTYFsb8+1JVJSZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QVjB2uwU7Aw6NOuAvpow9TQxNBKc6+D36x6Xk31UhnQcov7/7MhAqvYkwQ5Oga7Fc KiyorJkgLYa3MFj8z3/teij6+U4buqMhSxjvc2cxoHks0rSv+rwvmV202UvOpOkMmM fiRTS+wyUy5XFkllS3tLxMTKrcKXBY6Lci/OlPUY= 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.19 0372/1157] media: camss: csid: fix wrong size passed to devm_kmalloc_array() Date: Mon, 15 Aug 2022 19:55:28 +0200 Message-Id: <20220815180454.596391973@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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