Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp702600pxb; Tue, 5 Apr 2022 19:27:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKKrejn9gaP/1jFW/L1qntOFyRLHN0ftve4FeayUYSl0oImKQqMvU02X5G27mfCAvCHKO6 X-Received: by 2002:a05:6402:5193:b0:419:3d19:ce9e with SMTP id q19-20020a056402519300b004193d19ce9emr6435690edd.199.1649212028795; Tue, 05 Apr 2022 19:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212028; cv=none; d=google.com; s=arc-20160816; b=N7xzk5owhmtGBnxU3yQU/5fwKG931yiZZW9TqDXAhFno7FMD9/NR+Ooz5Nz9z3oJfe BSB8ZJAkSqNvkhYbEgMcLQ7MVsC1VXB5h+cJdD3u2D6MwKy2ZFgbm2v6ZaLS1QFM2Vuf Btg2LYktFWVdAcWOJ2cnIYBDmoPjqSBznJZRvwkx0F8aOKO3w1QtsJ22nllC4hFpqR8u imgy+V75s69Fynv+Omh7A+tPhbiIq3h3M1kj7OK8UNiyFvbmJyXbkpribsSmY3QTpMq2 eKWc1RxcI9R4icsUN7bnu8ZLyHV+DdTCZaTLUu60IxFkiEq/0wXdVjDQ5lMDTx2kyNVD 62tQ== 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=6KaOUugCn1WnRcXQ5ju590R21V0JlCwSvB+0sUaR9dM=; b=A+KOeB0pqrvsiB053Myanw8Xxcl//gGyzrt11qm0WNTtaDf9StEddqUYY6/+uB9bD0 7MqwivAbpMo3+RVPQVhLRgC81LUkfdsM3ixEB0ytyRvxOq3ejzltz2gLfu+S8TdRyFQV MCCWmCD4YBCR84JyCHNQMIAHvEa9hcq7+gKl4Cf4fDn0/gRF/AbXCr+93M33I9eAeGsR 8u1XoKTikG3Q39FOJSOLKReNsmfEvnjPKqw9MOSnE/xIIpx4FrCHPXn5nx6+yX+hBNOv /9CitD7wgrb62brQ3g2piF29AvCylQRkAgf5EoR5Yc4J8vAdUpHZaY7rwzOHIms9N168 q6tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Mvb2DAQA; 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 k2-20020a1709067ac200b006e7d5f87a02si421577ejo.439.2022.04.05.19.26.44; Tue, 05 Apr 2022 19:27:08 -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=Mvb2DAQA; 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 S1388347AbiDENWA (ORCPT + 99 others); Tue, 5 Apr 2022 09:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344414AbiDEJTz (ORCPT ); Tue, 5 Apr 2022 05:19:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBBEF31D; Tue, 5 Apr 2022 02: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 8345861572; Tue, 5 Apr 2022 09:08:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94089C385A1; Tue, 5 Apr 2022 09:08:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149690; bh=SCgcK3ystEM4p5FUpeXZzCOdyVTPsuyCpDS+LaZ2TR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mvb2DAQAbAERBVf1+pXaKUJEPV6DSYom5Fj7iC2LggsGsGWR5PxR72L015T7fMeck 95W5SYFS+fX4/ErcIT4xA7IALMDtoTxJCzWhVJMaQNzTSegOmSuHxvlQZEj6rIYMfm hoPzB6l1zJnH4+dvNgI7yS+3asJHylBquJrTnfeQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peiwei Hu , Sean Young , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.16 0807/1017] media: ir_toy: free before error exiting Date: Tue, 5 Apr 2022 09:28:40 +0200 Message-Id: <20220405070418.203293205@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 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: 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