diff options
author | Philipp Stanner <phasta@kernel.org> | 2025-04-25 10:17:43 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-05-05 19:32:13 +0900 |
commit | 14a3fd030c033453d436233f4c422b4903786ed3 (patch) | |
tree | 4366e25b7aa49e12e250bed63af735581b765df7 | |
parent | 938cabc603dc9b040fbfbf7c37b2b48dff8946d4 (diff) |
ASoC: intel: atom: Return -ENOMEM if pcim_iomap() fails
The error checks for pcim_iomap() have the function return -EINVAL.
-ENOMEM is a more appropriate error code.
Replace -EINVAL with -ENOMEM.
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250425081742.61623-6-phasta@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/atom/sst/sst_pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c index bf2330e6f5a4..22ae2d22f121 100644 --- a/sound/soc/intel/atom/sst/sst_pci.c +++ b/sound/soc/intel/atom/sst/sst_pci.c @@ -49,7 +49,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) ctx->ddr = pcim_iomap(pci, 0, 0); if (!ctx->ddr) - return -EINVAL; + return -ENOMEM; dev_dbg(ctx->dev, "sst: DDR Ptr %p\n", ctx->ddr); } else { @@ -59,7 +59,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) ctx->shim_phy_add = pci_resource_start(pci, 1); ctx->shim = pcim_iomap(pci, 1, 0); if (!ctx->shim) - return -EINVAL; + return -ENOMEM; dev_dbg(ctx->dev, "SST Shim Ptr %p\n", ctx->shim); @@ -67,7 +67,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) ctx->mailbox_add = pci_resource_start(pci, 2); ctx->mailbox = pcim_iomap(pci, 2, 0); if (!ctx->mailbox) - return -EINVAL; + return -ENOMEM; dev_dbg(ctx->dev, "SRAM Ptr %p\n", ctx->mailbox); @@ -76,7 +76,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) ctx->iram_base = pci_resource_start(pci, 3); ctx->iram = pcim_iomap(pci, 3, 0); if (!ctx->iram) - return -EINVAL; + return -ENOMEM; dev_dbg(ctx->dev, "IRAM Ptr %p\n", ctx->iram); @@ -85,7 +85,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) ctx->dram_base = pci_resource_start(pci, 4); ctx->dram = pcim_iomap(pci, 4, 0); if (!ctx->dram) - return -EINVAL; + return -ENOMEM; dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram); return 0; |