mei: convert PCI error to common errno

Ensure that callers receive only < 0 return value on error.
Convert PCI error returned by pci_read_config_dword()
to common errno before returning from function.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://patch.msgid.link/20260201094358.1440593-6-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Usyskin
2026-04-02 17:08:37 +02:00
committed by Greg Kroah-Hartman
parent eb1b5fc76a
commit 60ca15971a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -653,7 +653,7 @@ static int mei_txe_fw_status(struct mei_device *dev,
fw_src->status[i],
fw_status->status[i], ret);
if (ret)
return ret;
return pcibios_err_to_errno(ret);
}
return 0;
+1 -1
View File
@@ -153,7 +153,7 @@ static int mei_me_read_fws(const struct mei_device *dev, int where, const char *
ret = pci_read_config_dword(pdev, where, val);
trace_mei_pci_cfg_read(&dev->dev, name, where, *val, ret);
return ret;
return pcibios_err_to_errno(ret);
}
/**