From: Hou Zhiqiang Date: Fri, 5 Jul 2019 09:56:45 +0000 (+0800) Subject: PCI: mobiveil: Remove an unnecessary return value check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=afd899d3c8549cc82c8b329c0145e213c0755e60;p=linux.git 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 Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 51cbe53313437..ddc20d3f49e3d 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;