Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp206271lfu; Wed, 30 Mar 2022 20:56:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG5DaY22H8wIoXCQwwNiKn1RO8xnns1ED4yYe4aAINdsMXc9EKbM0/GKHuZwoK1KXn86X1 X-Received: by 2002:a63:6cca:0:b0:398:5811:6556 with SMTP id h193-20020a636cca000000b0039858116556mr8953975pgc.183.1648699004487; Wed, 30 Mar 2022 20:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648699004; cv=none; d=google.com; s=arc-20160816; b=eWvt1aY0rTbH0PYcezs4b9xojTMnxJzxK1PRPgT4S8X+W+d4449VfQI0ZcsHrXkP+N XYRj1U4GzFoheuT17Dl/URMmTYNz76urRmbstQixQBS5hpCk8CXPtjC9KktXu2rAGlPs GAeeD8o+RllkehVc6Izs547ly6xDhcVvqjKzOfNjV3sgeMfhO6sIsDqm04FCQgQG8OHy NA0IVLQlUULIM2itaM2qb+U0NdhMDmhGQbvFAWpQtPHOT8eK+t9OGci3ytrfmdDnuj5n e1JsSrwSyioD7dVwZfHF7wj/KP0HaSVnepsvHEhrniCPwOEftaNbj9uuhBo7X69lt65N aZGQ== 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=6KaOUugCn1WnRcXQ5ju590R21V0JlCwSvB+0sUaR9dM=; b=BS7Dn5kanfqwmKPbgezIpO4TR1oe9UfxAjZX4++Hy7+o2JatYuo/UgSQvh5rT5O3h7 pjtVCK+9c08GhE87p/pXy8GXpqMZIHsluJDLJ7Po8+m5pXIH0svIN3GEkaiAk0bRfS03 qMz21k8blJGErgznWvpyLqKvKJlcDgoL48beREW01W7Nileny7Tp9M0+bk1440RX99DT +d/zd3590tD+a0cbxuJlRPL9OOT3Q1K00TLQISvV9UA85xVorSkvurKHUPE1+PXvLXkg ZXCejXrloPR11t2buJkgYl3QdUDI0nwzV385y5yER5DCbad8N8bGIV+gGEvfl2WLDj3x QAUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mvR3zT7l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lw10-20020a17090b180a00b001c6bd57e2dasi2379543pjb.78.2022.03.30.20.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:56:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mvR3zT7l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 39DC516D8DB; Wed, 30 Mar 2022 20:08:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240714AbiC3L5I (ORCPT + 99 others); Wed, 30 Mar 2022 07:57:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344348AbiC3Lw6 (ORCPT ); Wed, 30 Mar 2022 07:52:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8C3261307; Wed, 30 Mar 2022 04:48:44 -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 ams.source.kernel.org (Postfix) with ESMTPS id 9B03CB81ACC; Wed, 30 Mar 2022 11:48:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A95C2C340EE; Wed, 30 Mar 2022 11:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648640920; bh=SCgcK3ystEM4p5FUpeXZzCOdyVTPsuyCpDS+LaZ2TR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvR3zT7lBZQwvRUSnAxE1QUiT3KiDLekq2iTOVjyhIpFkC1Pjd6cXrbbaZ1d6dRiA CT/+0KxdfPicFyB29zXbT3+X22WKcFzW7ncpOUTJ4DJ3JnaOwIEpj2cGdfe7aLhqFB J5AHx0wucrLyk1d5ag5w2SjSknWkhZiExSe7C3o/MjV7joa1lgCbe45Vk736xfj89H WMeLSMaON4fO/zUDz6So1ms/dGPsMUdpxpfGQ20ZXXVtCtZ4AOWfgKKWLBwgWISoLw XTGt3rcpbJPUG9/S+0Ioae29uVHbnVdIhhax3WFcSVwI5o5L182RRvfn76UmzZXv2T hXlqCniLc5ojw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peiwei Hu , Sean Young , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 05/59] media: ir_toy: free before error exiting Date: Wed, 30 Mar 2022 07:47:37 -0400 Message-Id: <20220330114831.1670235-5-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220330114831.1670235-1-sashal@kernel.org> References: <20220330114831.1670235-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Peiwei Hu [ Upstream commit 52cdb013036391d9d87aba5b4fc49cdfc6ea4b23 ] Fix leak in error path. Signed-off-by: Peiwei Hu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/rc/ir_toy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/ir_toy.c b/drivers/media/rc/ir_toy.c index 7e98e7e3aace..196806709259 100644 --- a/drivers/media/rc/ir_toy.c +++ b/drivers/media/rc/ir_toy.c @@ -458,7 +458,7 @@ static int irtoy_probe(struct usb_interface *intf, err = usb_submit_urb(irtoy->urb_in, GFP_KERNEL); if (err != 0) { dev_err(irtoy->dev, "fail to submit in urb: %d\n", err); - return err; + goto free_rcdev; } err = irtoy_setup(irtoy); -- 2.34.1