]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: sdhci-pci: Convert PCIBIOS_* return codes to errnos
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 27 May 2024 13:24:41 +0000 (16:24 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 20 Jun 2024 08:57:44 +0000 (10:57 +0200)
commitebc4fc34eae8ddfbef49f2bdaced1bf4167ef80d
treefc6aab2344f7cef3eb0845c62da9d9bf0dbb2880
parent6ba59ff4227927d3a8530fc2973b80e94b54d58f
mmc: sdhci-pci: Convert PCIBIOS_* return codes to errnos

jmicron_pmos() and sdhci_pci_probe() use pci_{read,write}_config_byte()
that return PCIBIOS_* codes. The return code is then returned as is by
jmicron_probe() and sdhci_pci_probe(). Similarly, the return code is
also returned as is from jmicron_resume(). Both probe and resume
functions should return normal errnos.

Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal
errno before returning them the fix these issues.

Fixes: 7582041ff3d4 ("mmc: sdhci-pci: fix simple_return.cocci warnings")
Fixes: 45211e215984 ("sdhci: toggle JMicron PMOS setting")
Cc: stable@vger.kernel.org
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20240527132443.14038-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-core.c