]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:29 +0000 (16:29 +0200)
commite85ab507882db165c10a858d7f685a0a38f0312e
treebdb3bbcb2ef09667728faac77592cbd1813bc330
parent8e152448d0a099b71d64d3e52fcfc8175fbd123b
PCI: keystone: Fix if-statement expression in ks_pcie_quirk()

[ Upstream commit 6188a1c762eb9bbd444f47696eda77a5eae6207a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pci-keystone.c