From patchwork Tue Feb 28 08:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 9594911 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9736460453 for ; Tue, 28 Feb 2017 08:08:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8869F284BC for ; Tue, 28 Feb 2017 08:08:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D882284FF; Tue, 28 Feb 2017 08:08:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11846284BC for ; Tue, 28 Feb 2017 08:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751826AbdB1IId (ORCPT ); Tue, 28 Feb 2017 03:08:33 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44772 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbdB1IIb (ORCPT ); Tue, 28 Feb 2017 03:08:31 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9DD9760D6F; Tue, 28 Feb 2017 08:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1488269310; bh=YN2sZecPYODQxoPIdDxaED8kOPqaI5twvULiMszygOY=; h=From:To:Cc:Subject:Date:From; b=YHycECWfN8V73M5+RhZCsq1XW500/w1A0IT0le/Pw2C3zidrV+xA96M08ktN9dYLT crw9XfiCGUfCY8rflaRbx4nSMEzQccqbAbevbyn7pMJwYCLLqGlx30S5vnPhecaBHr O5Jf3WE39gLw8e+LrB1Cw523853Z1EJ8L8l6kWpw= Received: from blr-ubuntu-41.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4399360D5C; Tue, 28 Feb 2017 08:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1488269309; bh=YN2sZecPYODQxoPIdDxaED8kOPqaI5twvULiMszygOY=; h=From:To:Cc:Subject:Date:From; b=ZWe1EUdNPbs52PJOfyc6H1Ob7X4KjP7P3KyH08iw6rGM2D9E9CgW/Mrm2Bt3xcEOG w9wEty1UHw6QxifHGglDN9cL8+atzUwwk7WNFCrPD/f8GDT6LCcz6lWTq44Yj8TGFI hwD3gneedpnXcMEFlQLlo2N15ZR1LBJKrGU1EdFE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4399360D5C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: bhelgaas@google.com Cc: Vivek Gautam , Guenter Roeck , Kishon Vijay Abraham I , Jingoo Han , Joao Pinto , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pci: dwc: Fix NULL pointer dereference due to missing assignment Date: Tue, 28 Feb 2017 13:38:18 +0530 Message-Id: <1488269298-23056-1-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add missing assignment of dw_pci core structure for designware-plat. Commit 8b130f815a6b ("PCI: dwc: Fix crashes seen due to missing assignments") fixed all other platforms, but missed designware-plat file. Fixes: 442ec4c04d12 ("PCI: dwc: all: Split struct pcie_port into host-only and core structures") Cc: Guenter Roeck Cc: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Jingoo Han Cc: Joao Pinto Cc: linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vivek Gautam --- Based on torvald's master branch. Build tested. drivers/pci/dwc/pcie-designware-plat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/dwc/pcie-designware-plat.c b/drivers/pci/dwc/pcie-designware-plat.c index 65250f63515c..b6c832ba39dd 100644 --- a/drivers/pci/dwc/pcie-designware-plat.c +++ b/drivers/pci/dwc/pcie-designware-plat.c @@ -104,6 +104,8 @@ static int dw_plat_pcie_probe(struct platform_device *pdev) pci->dev = dev; + dw_plat_pcie->pci = pci; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); pci->dbi_base = devm_ioremap_resource(dev, res); if (IS_ERR(pci->dbi_base))