1
0
Fork 0

staging: mt7621-pci: reverse condition to check for enabled port

Each enabled port is being checked in 'mt7621_pcie_enable_ports"
function calling 'mt7621_pcie_enable_port'. The return value for
this function on success is zero, so the check is reversed. Fix it.

Fixes: 802a2f7b2fe3: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Sergio Paracuellos 2019-02-15 13:10:40 +01:00 committed by Greg Kroah-Hartman
parent 1623171dc1
commit 8b20408a56
1 changed files with 1 additions and 1 deletions

View File

@ -506,7 +506,7 @@ static void mt7621_pcie_enable_ports(struct mt7621_pcie *pcie)
list_for_each_entry(port, &pcie->ports, list) {
if (port->enabled) {
if (!mt7621_pcie_enable_port(port)) {
if (mt7621_pcie_enable_port(port)) {
dev_err(dev, "de-assert port %d PERST_N\n",
port->slot);
continue;