PCI/ERR: Fix state assignment
PATCH 1/1 PCI/ERR: Fix state assignment
The state was intended to be assigned rather than compared for equality.
Fixes 8fae7d8809b815148 ("PCI/ERR: Simplify pci_dev_set_io_state()")
Cc Bjorn Helgass <[email protected]>
Signed-off-by Keith Busch <[email protected]>
--- drivers/pci/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci.h +1 -1
@@ -345,7 +345,7 @@ static inline bool pci_dev_set_io_state(struct pci_dev *dev,/* Can always put a device in perm_failure state */ if (new == pci_channel_io_perm_failure) { - dev->error_state == pci_channel_io_perm_failure; + dev->error_state = pci_channel_io_perm_failure;return true; }
Signature · 1 line
2.25.4
Hi Keith,
[...]
drivers/pci/pci.h static inline bool pci_dev_set_io_state(struct pci_dev *dev, · line 348
Quoted 3 lines
drivers/pci/pci.h +1
-1if (new == pci_channel_io_perm_failure) { - dev->error_state == pci_channel_io_perm_failure; + dev->error_state = pci_channel_io_perm_failure;
[...]
Ouch! Nice catch.
Reviewed-by Krzysztof Wilczyński <[email protected]>
Krzysztof
Quoted 9 lines · Krzysztof Wilczyński
Hi Keith,
[...]
drivers/pci/pci.h static inline bool pci_dev_set_io_state(struct pci_dev *dev, · line 348
Quoted 3 lines
drivers/pci/pci.h +1
-1if (new == pci_channel_io_perm_failure) { - dev->error_state == pci_channel_io_perm_failure; + dev->error_state = pci_channel_io_perm_failure;[...]
Ouch! Nice catch.
Heh, the 0-day build actually caught this one, so credit to the bot! :)