[RFC PATCH 16/17] mtd: Drop uses of pci_read_config_*() return value

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

drivers/mtd/maps/ichxrom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
index fda72c5fd8f9..04728d902e49 100644
--- a/drivers/mtd/maps/ichxrom.c
+++ b/drivers/mtd/maps/ichxrom.c
@@ -61,8 +61,8 @@ static void ichxrom_cleanup(struct ichxrom_window *window)
int ret;

/* Disable writes through the rom window */
- ret = pci_read_config_word(window->pdev, BIOS_CNTL, &word);
- if (!ret)
+ pci_read_config_word(window->pdev, BIOS_CNTL, &word);
+ if (word != (u16)~0)
pci_write_config_word(window->pdev, BIOS_CNTL, word & ~1);
pci_dev_put(window->pdev);

--
2.18.4