mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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:
committed by
Greg Kroah-Hartman
parent
eb1b5fc76a
commit
60ca15971a
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user