]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: keystone: Fix if-statement expression in ks_pcie_quirk()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 19 Jul 2024 23:53:26 +0000 (18:53 -0500)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Tue, 13 Aug 2024 20:07:58 +0000 (20:07 +0000)
commit6188a1c762eb9bbd444f47696eda77a5eae6207a
treea7af2e9ed45f1558062581075575b20a1c9b82c2
parent8400291e289ee6b2bf9779ff1c83a291501f017b
PCI: keystone: Fix if-statement expression in ks_pcie_quirk()

This code accidentally uses && where || was intended.  It potentially
results in a NULL dereference.

Thus, fix the if-statement expression to use the correct condition.

Fixes: 86f271f22bbb ("PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0)")
Link: https://lore.kernel.org/linux-pci/1b762a93-e1b2-4af3-8c04-c8843905c279@stanley.mountain
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
drivers/pci/controller/dwc/pci-keystone.c