aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHou Zhiqiang <[email protected]>2019-07-05 17:56:45 +0800
committerLorenzo Pieralisi <[email protected]>2019-07-08 12:28:44 +0100
commitafd899d3c8549cc82c8b329c0145e213c0755e60 (patch)
tree5c6b0846974e6285a78b8c0596c0597fb50043c3
parente0a7e56368a4a58488c80693f0b630a0a05f6c8d (diff)
PCI: mobiveil: Remove an unnecessary return value check
The memory for the host controller private structure (struct mobiveil_pcie) is allocated together with the pci_host_bridge structure in function devm_pci_alloc_host_bridge(), so it is unnecessary to check the return value when get the private structure pointer. Remove the useless check. Signed-off-by: Hou Zhiqiang <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Minghuan Lian <[email protected]> Reviewed-by: Subrahmanya Lingappa <[email protected]>
-rw-r--r--drivers/pci/controller/pcie-mobiveil.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c
index 51cbe5331343..ddc20d3f49e3 100644
--- a/drivers/pci/controller/pcie-mobiveil.c
+++ b/drivers/pci/controller/pcie-mobiveil.c
@@ -851,8 +851,6 @@ static int mobiveil_pcie_probe(struct platform_device *pdev)
return -ENOMEM;
pcie = pci_host_bridge_priv(bridge);
- if (!pcie)
- return -ENOMEM;
pcie->pdev = pdev;