[RFC PATCH 07/17] fpga: altera-cvp: Drop uses of pci_read_config_*() return value

Saheed O. Bolarinwa
2020-08-01T12:25:36Z

drivers/fpga/altera-cvp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index 4e0edb60bfba..99c6e0754f8b 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -96,15 +96,15 @@ struct cvp_priv {
static int altera_read_config_byte(struct altera_cvp_conf *conf,
int where, u8 *val)
{
- return pci_read_config_byte(conf->pci_dev, conf->vsec_offset + where,
- val);
+ pci_read_config_byte(conf->pci_dev, conf->vsec_offset + where, val);
+ return (val == (u8)~0) ? -ENODEV : 0;
}

static int altera_read_config_dword(struct altera_cvp_conf *conf,
int where, u32 *val)
{
- return pci_read_config_dword(conf->pci_dev, conf->vsec_offset + where,
- val);
+ pci_read_config_dword(conf->pci_dev, conf->vsec_offset + where, val);
+ return (val == (u32)~0) ? -ENODEV : 0;
}

static int altera_write_config_dword(struct altera_cvp_conf *conf,
--
2.18.4