Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1518563rwj; Sun, 18 Dec 2022 09:43:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXuGtZBDfLaTS+EnHVYJiFsXq5nlXy/tQKIbBaKAOaassjWVBemqPLO1CH9Fd2yaq+aKFzsm X-Received: by 2002:a05:6a20:4f91:b0:af:8ff3:fc80 with SMTP id gh17-20020a056a204f9100b000af8ff3fc80mr6095638pzb.20.1671385386249; Sun, 18 Dec 2022 09:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671385386; cv=none; d=google.com; s=arc-20160816; b=NYZY3VwHo33g/0M9hvI/4CoYaf/b1DSfMgrXocshHUyUzjdWMQhaNU32MxWnNzaFsd 6P5oAa3EmSyB9L6Ew+yw/FxRPXfjD1K61VHZbYi8vLqG+clMjGVZnyBjDxaUdkCqPyNp AEE8dcWhHUmottgN45SiNuVrHP2jx9PzVsz651qWjbquxFCB6h8es50rQuXvORn1Mo1s RsDmW9ee0UIinALBhHBBWAR7k9QUd++3SPb2ZzZSHouE6aOGhQlZ7oGEmyi6HZQAPOL8 VEDNzukTSMqojIMUJQWqpvY9O/R5gFSYbGHD/tN7kKueOxrP8ikvcWBKVgVfffO1Z4Cz +4FA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eDJDs5E94tGXjzWX48ioaBPpRLBr8990fpyYeJXrX9g=; b=oRuvO6JKM80qNkV1WQTw+4INcYaIN+M299bpLfNLIMveXCRk5R9FRdkoa3atbshlnx 1nbZdr10LK5C1eplDpJfjGdZy4PurWIre7zt/KnqjuUiGYlv9yUYlndRw//ti17caSa7 Pn+fmlB3t8RCvMdGYi7ZgL1h3W6UkBKIbS1bHQSKwDAeMjNr21tsSNFBiMe7x/f56uaL boly4hYGRUXNgLuKqqG6iY8/lRDBAhobNmvwSILQS3mvhSL8COu4Q+/cBEFnaLHfcQ2w c8bgH2pe04H9CImexRdPBSikuRN68FEXM9fm6EreHke4HUDlK7fpAMerVc6DvpdfUAIn 5Ugg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qDPxPV49; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a170902c40d00b00189655d7144si9477657plk.161.2022.12.18.09.42.57; Sun, 18 Dec 2022 09:43:06 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=qDPxPV49; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbiLRQnP (ORCPT + 70 others); Sun, 18 Dec 2022 11:43:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232492AbiLRQli (ORCPT ); Sun, 18 Dec 2022 11:41:38 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0846B1FF; Sun, 18 Dec 2022 08:15:07 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 3775ECE0BAF; Sun, 18 Dec 2022 16:15:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3A13C433EF; Sun, 18 Dec 2022 16:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671380104; bh=mvMMLmvxlfsWFgwEr+ZHtBmL6gLBDdJIqM9J7cHhbW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qDPxPV49m5XKo7KMteyhdJ7mwQVwZl/u5D5RrRLz+hYxGK0ebbdAVbov2PLti3/iM il1BK43K/l8YRnRD9rnxQL48eU27WE3vz3zLRJoFLwEpP/E8IaKW+Btr0bkM2jMlvn hpaPs8AkV4+UpKF1FIdgbkZyarL5sh81ctOCUYeXWRGQH5cXWZcFgbNbzzfLvbEzwB jvEKQuSWQmeKOlmEDyJsO0XI2SAlB0vTnVNRlKDeZhms5eJ2Bc0XFT7b+KCJWdMyfP 7k4XRDFZe7Inb71sRDB5EpTxkGDh4KPCay9GrmX68+f/iFgcoAKVvAjqzS9XQQ3e2E nf2eRqiDj3n8A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yan Lei , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 34/46] media: dvb-frontends: fix leak of memory fw Date: Sun, 18 Dec 2022 11:12:32 -0500 Message-Id: <20221218161244.930785-34-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221218161244.930785-1-sashal@kernel.org> References: <20221218161244.930785-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 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: Yan Lei [ Upstream commit a15fe8d9f1bf460a804bcf18a890bfd2cf0d5caa ] Link: https://lore.kernel.org/linux-media/20220410061925.4107-1-chinayanlei2002@163.com Signed-off-by: Yan Lei Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/bcm3510.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb-frontends/bcm3510.c b/drivers/media/dvb-frontends/bcm3510.c index da0ff7b44da4..68b92b4419cf 100644 --- a/drivers/media/dvb-frontends/bcm3510.c +++ b/drivers/media/dvb-frontends/bcm3510.c @@ -649,6 +649,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe) deb_info("firmware chunk, addr: 0x%04x, len: 0x%04x, total length: 0x%04zx\n",addr,len,fw->size); if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) { err("firmware download failed: %d\n",ret); + release_firmware(fw); return ret; } i += 4 + len; -- 2.35.1