Received: by 10.213.65.68 with SMTP id h4csp1732810imn; Mon, 19 Mar 2018 11:44:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELsYp/a/czOdup2DOHXTVzxtMbM2igukH8m59ueNwbSxqLO+kvs2pYgt1M7NIrEN0/uPq0fK X-Received: by 10.98.1.196 with SMTP id 187mr10915317pfb.152.1521485091504; Mon, 19 Mar 2018 11:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521485091; cv=none; d=google.com; s=arc-20160816; b=DhTfynlN2CQzFLrVrFMGpNkhLmBnxPR0JmhEANb/wG1WfOuuJAfgdsmzCt3RV0aFC9 sAMhhbbrA/iTWDPiocm/K3DVRkBVE6hwukX0IYk9iY7ghey0MmnVbjjTLNU8XWBy3Ewi SbBPRz1Kz5+BzWgrOY0WDUSCWTKC1iqoxXuYeO4AYcgp8810muxweqHP6Hlys6ivBhFl OG0h4r4MngBPrTEtBKKOYzSQtgWqeYVFn/bg6I5DXIIc/0GRdY8m/Xtbyk4gyn1srR6V WtVOwZReYi4RAOxTarEmNNzLmNw0UYMq4DsbpPvfAUxykO0l6oS+7bW8/DLMC0aTCKs2 QiGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=59S22tWbT8hAULmI2DJdHF0cnwW7Zi7qMvaslNUUMpE=; b=ThvfaZBL7upwGDhqORgLHonDFE7bCFEhXOqdDAfZXOrmKsGuJm7lZpgkFKAwPoiULa 2Jqbw83WQmN7Ys44NzWELZoQE2OMOTc5k4w/1cnhzDJoOCsmh5LK3IuqxGXDTMtKj2Yu Y9eQe0UbIyIZldZwOAssIAPoKf6F0N8iYrIYN8y8d7XWqke2tmrXQBWdXpmsgOnC1hXz Lq+ZbyUMCYfemanGz2w/xEpz1bCl/v7uFXr3c1QlTx3ooWVWDLlszI/yCg1gwNq8PCzZ 6PQWanhOdLuPSyNTy87464HpNZXuX5NBbERg9vf5mZl33y9eYQ4ChUJOGkNqq7i3HbWi aaSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a68si330981pgc.467.2018.03.19.11.44.37; Mon, 19 Mar 2018 11:44:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970440AbeCSSl5 (ORCPT + 99 others); Mon, 19 Mar 2018 14:41:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54042 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970334AbeCSScn (ORCPT ); Mon, 19 Mar 2018 14:32:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BC78D1291; Mon, 19 Mar 2018 18:32:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Felipe Balbi Subject: [PATCH 4.15 44/52] USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe() Date: Mon, 19 Mar 2018 19:08:42 +0100 Message-Id: <20180319180737.426636480@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180734.976730813@linuxfoundation.org> References: <20180319180734.976730813@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yongjun commit 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 upstream. Add the missing platform_device_put() before return from bdc_pci_probe() in the platform_device_add_resources() error handling case. Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Signed-off-by: Wei Yongjun Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/udc/bdc/bdc_pci.c +++ b/drivers/usb/gadget/udc/bdc/bdc_pci.c @@ -77,6 +77,7 @@ static int bdc_pci_probe(struct pci_dev if (ret) { dev_err(&pci->dev, "couldn't add resources to bdc device\n"); + platform_device_put(bdc); return ret; }