[RFC PATCH 05/17] dmaengine: ioat: Drop uses of pci_read_config_*() return value

Saheed O. Bolarinwa
2020-08-01T12:24:41Z

drivers/dma/ioat/dma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index fd782aee02d9..e51418cf93b6 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -1016,12 +1016,12 @@ int ioat_reset_hw(struct ioatdma_chan *ioat_chan)

if (ioat_dma->version < IOAT_VER_3_3) {
/* clear any pending errors */
- err = pci_read_config_dword(pdev,
+ pci_read_config_dword(pdev,
IOAT_PCI_CHANERR_INT_OFFSET, &chanerr);
- if (err) {
+ if (chanerr == (u32)~0) {
dev_err(&pdev->dev,
"channel error register unreachable\n");
- return err;
+ return -ENODEV;
}
pci_write_config_dword(pdev,
IOAT_PCI_CHANERR_INT_OFFSET, chanerr);
--
2.18.4