Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1292313ybg; Mon, 27 Jul 2020 12:59:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY8wS9CjC4+i81WLG0GoB4Dsz/LyN8o8wZkRUm1qEzyDBAiJ8SlrZFvS+h9LJnPtjIFZZA X-Received: by 2002:a17:906:ca4d:: with SMTP id jx13mr14804109ejb.548.1595879976421; Mon, 27 Jul 2020 12:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595879976; cv=none; d=google.com; s=arc-20160816; b=V32I3kWo3Q92iA+YO3WNDhSVc6qS+UeXrriXmNKRnO2K9hlqWhMKzeF4Go75CZmx35 eE/5PHvFQyFz/VpLovZtTNExbEP1IsE9rw9AwHrANJLADhTcADfBVAMqBuGW9Y8/Cth/ vJO/fYYSi1KjvXWpfh40l2hFQJV03IRzMxMxmhAnA18xLcuDG74TB72AL7Hs8Q0not9B ezFw2Z9FiCl5n8ewUPzNa3rQZXGKFKCQZcci3QAZmdZ8GRwRCFFxKEcS/s2gZXiZeMZe HnUVBw+UPOexvgDRYe1cXElEKOjvTMzOL+EtsDxgPNLtjZhGiCiUTtn2d1lgF50V/QLc LU6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PjEiUQq3TCTATnt++DQbdDy3vgytR19vhSPR+vNC+6M=; b=uau21ZuKPwHbYlRSsZ25YstrCZt7ngEftq5ZyqdL+c0TolShvwWiA30xRQY8huBGFp B1nogT2BaIQsicPoahOnInKjuUekHTRydqvh7IPjKow9F/zrn8VgwJvhVF//lU4TdQ0b LFaEqP7iYt/cOJcRSYbOgcbr89WKB85HC/1wgaWILLX4pg89hGaQUZCGxoDndfkh17Xm lv3dIdkx2z09em61LOUdkESCpffio1NRCF5slK1F/WE7u5sFDVktChjttkmUfYcpfZ3C RS53IwVGqnjFWAFISgxU8NvN5lwUwp8YiRluYKcjzS+5RDCc/FnwYb/8bAjwTUyNbmAJ fp8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=krsKeN2D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si2721864eds.466.2020.07.27.12.59.14; Mon, 27 Jul 2020 12:59:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=krsKeN2D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729024AbgG0T4o (ORCPT + 99 others); Mon, 27 Jul 2020 15:56:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:43936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgG0T4o (ORCPT ); Mon, 27 Jul 2020 15:56:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 598A62072E; Mon, 27 Jul 2020 19:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595879803; bh=8AzCarMRtNvpFmv6CLe9LN+iMyNxXBO5Qr1sPYzB+j8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=krsKeN2DScs85NMOxCVNvPD6miSBkNOFc9qD/hmUvr0yQ5XtEq6jCH0Bjoe84l0kr orvcrsnQE1mekBu3pKRGpuOsNWq1jonPpPstUDGvt2F4Did/2eCxaYDm04Sblx4HD4 SgfEr+igyMWJzg8IlE9f4GAqWbPVpXT3cMFmNnDE= Date: Mon, 27 Jul 2020 21:56:38 +0200 From: Greg KH To: Martin Blumenstingl Cc: hminas@synopsys.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, marex@denx.de, stable@vger.kernel.org Subject: Re: [PATCH v3] usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails Message-ID: <20200727195638.GA240997@kroah.com> References: <20200727173801.792626-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200727173801.792626-1-martin.blumenstingl@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 27, 2020 at 07:38:01PM +0200, Martin Blumenstingl wrote: > Call dwc2_debugfs_exit() and dwc2_hcd_remove() (if the HCD was enabled > earlier) when usb_add_gadget_udc() has failed. This ensures that the > debugfs entries created by dwc2_debugfs_init() as well as the HCD are > cleaned up in the error path. > > Fixes: 207324a321a866 ("usb: dwc2: Postponed gadget registration to the udc class driver") > Signed-off-by: Martin Blumenstingl > --- > Changes since v2 at [1]: > - add #if around the new label and it's code to prevent the following > warning found by the Kernel test robot: > unused label 'error_debugfs' [-Wunused-label] > > Changes since v1 at [0] > - also cleanup the HCD as suggested by Minas (thank you!) > - updated the subject accordingly > > > [0] https://patchwork.kernel.org/patch/11631381/ > [1] https://patchwork.kernel.org/patch/11642957/ This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.