Message ID | 20201117122112.171086121@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78F21C63798 for <stable@archiver.kernel.org>; Tue, 17 Nov 2020 14:02:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BB8520729 for <stable@archiver.kernel.org>; Tue, 17 Nov 2020 14:02:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="zSt4v829" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729979AbgKQNN6 (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 17 Nov 2020 08:13:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:44506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729974AbgKQNNz (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 17 Nov 2020 08:13:55 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 9F9602225B; Tue, 17 Nov 2020 13:13:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618835; bh=6U9xVuBFhCt5nqfNxn//sTWcz874C1yrKV6OPWBMONY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zSt4v829YW/4J26ErwXiiO9hnqBxMZk9iYWLi5aUDeqllypt8qc4TvBLk9tLXGHsj EJzSId0rrlOUVROxGLspNIsFfbkeaImu3GrnPKP7b8FbLx0HTtRXVaN2sl0azWcKue Qw79EiVN9snWqlc+R3G29iPxaWH/7F1Uwh7QE+NQ= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Pavel Andrianov <andrianov@ispras.ru>, Evgeny Novikov <novikov@ispras.ru>, Felipe Balbi <balbi@kernel.org>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.14 23/85] usb: gadget: goku_udc: fix potential crashes in probe Date: Tue, 17 Nov 2020 14:04:52 +0100 Message-Id: <20201117122112.171086121@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122111.018425544@linuxfoundation.org> References: <20201117122111.018425544@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/usb/gadget/udc/goku_udc.c b/drivers/usb/gadget/udc/goku_udc.c index 8433c22900dcb..0ed0d03651329 100644 --- a/drivers/usb/gadget/udc/goku_udc.c +++ b/drivers/usb/gadget/udc/goku_udc.c @@ -1772,6 +1772,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err; } + pci_set_drvdata(pdev, dev); spin_lock_init(&dev->lock); dev->pdev = pdev; dev->gadget.ops = &goku_ops; @@ -1805,7 +1806,6 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) } dev->regs = (struct goku_udc_regs __iomem *) base; - pci_set_drvdata(pdev, dev); INFO(dev, "%s\n", driver_desc); INFO(dev, "version: " DRIVER_VERSION " %s\n", dmastr()); INFO(dev, "irq %d, pci mem %p\n", pdev->irq, base);