summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2021-10-03 02:54:39 +0000
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2021-10-05 10:05:14 +0100
commit65315ec52c9bd518e22fde1c9ce1e787b9122b4a (patch)
treefd3f32f26a7f9f957b80a43f0e4048066965c0e3 /drivers/pci
parente4e737bb5c170df6135a127739a9e6148ee3da82 (diff)
downloadlinux-stable-65315ec52c9bd518e22fde1c9ce1e787b9122b4a.tar.gz
linux-stable-65315ec52c9bd518e22fde1c9ce1e787b9122b4a.tar.bz2
linux-stable-65315ec52c9bd518e22fde1c9ce1e787b9122b4a.zip
PCI: imx6: Remove unused assignment to variable ret
Previously, the maximum link speed was set following an "fsl,max-link-speed" property read, and should the read failed, then the PCIe generation was manually set to PCIe Gen1 and thus limiting the link speed to 2.5 GT/s. Code refactoring completed in the commit 39bc5006501c ("PCI: dwc: Centralize link gen setting") changed to the logic that was previously used to limit the maximum link speed leaving behind an unused assignment to a variable "ret". Since the value returned from the of_property_read_u32() and stored in the variable "ret" is never used in any meaningful way, and it's also immediately reassigned in the code that follows, the assignment can be removed. Link: https://lore.kernel.org/r/20211003025439.84783-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/dwc/pci-imx6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 80fc98acf097..26f49f797b0f 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1132,7 +1132,7 @@ static int imx6_pcie_probe(struct platform_device *pdev)
/* Limit link speed */
pci->link_gen = 1;
- ret = of_property_read_u32(node, "fsl,max-link-speed", &pci->link_gen);
+ of_property_read_u32(node, "fsl,max-link-speed", &pci->link_gen);
imx6_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie");
if (IS_ERR(imx6_pcie->vpcie)) {