Received: by 10.213.65.68 with SMTP id h4csp21625imn; Mon, 19 Mar 2018 18:11:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELu+EzXo1IYL41akPflJnVVM3CG1wayaFL1g1iIUIhRcNX4KOGAoYewEDqkx91N+ybHY8SsC X-Received: by 2002:a17:902:9696:: with SMTP id n22-v6mr11439496plp.29.1521508296657; Mon, 19 Mar 2018 18:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521508296; cv=none; d=google.com; s=arc-20160816; b=BH8jCpnBeTiFHeZtMcQgxX5QGdRY2KBIjUadroCPAyXVqtL9x9Ir8O98rGKyLSzpyd c/lPQeC8P1BY/OA0klLHJo/PLUdRK196LbNdiLUkEhF4qyhk208lIACTEuWHK2b3woha PdgemU822iJUXpb8ayvWH6IIX8zx5X1kV4DIrJM8GLXAGk8YjiM0T4Kg1MyavxVbF1CT 7Ag7vydq2fbEwFuZbbk8Gx3CcrFzDIUoA6LTKBe9jnH7y7IeaK+rBdGS5PlC2kJDKn8y Azj+yuFobbo3I0fcn+eCSbKyfuP6wTrS/10HfeyegHlbI2sLIjxv+6JlwSyh9S5LjLAk av1A== 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=lAS8Na9F7Kwjhz/+VCRy7dkG8SwZoZUBhm4qpqmYk1I=; b=o5Kgdhb167b5FEragb3CM92tZauBlJ5hkKrXbs5XJaEye2dsUJTc/sxxro73zFltmv BgYzQQu1aiU8FUc9Z5Ijl+Gv2FpMg3RrPWFV30sCPXuFP7Df6l671Wh0ysjELH0tEGUF SFyfEgZxP41GJXmid7xVO7RtnaNsyFhpzEPik+QpM6fSHwVt+hZAW8He7SJ87l1VTshk /o/TUB6+504pC0/aeP/GLQhm9PjjgX+W+4qnBgcWfxO+YnHUYXiJ8AWkp8FOgpp/Qnin m/I/V2zK5uupRVzfqvQs/CX/ulY7UpzzmBL25KJpIRbeSBvoT7vOjcdUJLEJPZ4UibSq Y1Fg== 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 b7-v6si434257plr.399.2018.03.19.18.11.23; Mon, 19 Mar 2018 18:11:36 -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 S970715AbeCSTBj (ORCPT + 99 others); Mon, 19 Mar 2018 15:01:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52314 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031759AbeCSS2l (ORCPT ); Mon, 19 Mar 2018 14:28:41 -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 45024F3E; Mon, 19 Mar 2018 18:28:40 +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.9 239/241] USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe() Date: Mon, 19 Mar 2018 19:08:24 +0100 Message-Id: <20180319180801.068116443@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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 @@ -82,6 +82,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; }