linux/drivers
Nícolas F. R. A. Prado 67ca3f9807 remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing
The current code doesn't check whether platform_get_resource_byname()
succeeded to get the l1tcm memory, which is optional, before attempting
to map it. This results in the following error message when it is
missing:

  mtk-scp 10500000.scp: error -EINVAL: invalid resource (null)

Add a check so that the remapping is only attempted if the memory region
exists. This also allows to simplify the logic handling failure to
remap, since a failure then is always a failure.

Fixes: ca23ecfdbd ("remoteproc/mediatek: support L1TCM")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240627-scp-invalid-resource-l1tcm-v1-1-7d221e6c495a@collabora.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-06-28 11:56:24 -06:00
..
accel
accessibility Char/Misc bugfix for 6.10-rc1 2024-05-24 08:43:25 -07:00
acpi Char/Misc and other driver subsystem changes for 6.10-rc1 2024-05-22 12:26:46 -07:00
amba
android
ata
atm
auxdisplay - Fix-ups 2024-05-22 10:45:12 -07:00
base regmap: Fix for v6.10 2024-05-23 13:38:31 -07:00
bcma
block block-6.10-20240523 2024-05-23 13:44:47 -07:00
bluetooth virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
bus tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
cache
cdrom
cdx
char ipmi: Mostly updates for deprecated interfaces 2024-05-25 14:32:29 -07:00
clk
clocksource RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
comedi
connector
counter
cpufreq
cpuidle
crypto virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
cxl tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
dax
dca
devfreq
dio
dma
dma-buf tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
dpll
edac
eisa
extcon
firewire
firmware virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
fpga Char/Misc and other driver subsystem changes for 6.10-rc1 2024-05-22 12:26:46 -07:00
fsi
gnss
gpio virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
gpu drm fixes for 6.10-rc1 2024-05-24 17:28:02 -07:00
greybus
hid - Fix-ups 2024-05-22 10:45:12 -07:00
hsi
hte
hv Char/Misc and other driver subsystem changes for 6.10-rc1 2024-05-22 12:26:46 -07:00
hwmon Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
hwspinlock hwspinlock: qcom: implement bust operation 2024-05-29 12:52:26 -07:00
hwtracing Char/Misc and other driver subsystem changes for 6.10-rc1 2024-05-22 12:26:46 -07:00
i2c
i3c i3c: dw: Add hot-join support. 2024-05-23 00:29:19 +02:00
idle
iio Char/Misc and other driver subsystem changes for 6.10-rc1 2024-05-22 12:26:46 -07:00
infiniband tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
input Input updates for v6.10-rc0 2024-05-24 09:01:21 -07:00
interconnect tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
iommu tracing: Remove second argument of __assign_str() 2024-05-23 12:28:01 -07:00
ipack
irqchip irqchip: riscv-imsic: Fixup riscv_ipi_set_virq_range() conflict 2024-05-23 04:48:40 -07:00
isdn
leds
macintosh
mailbox
mcb
md
media tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
memory
memstick
message
mfd
misc tracing: Remove second argument of __assign_str() 2024-05-23 12:28:01 -07:00
mmc
most
mtd
mux
net Quite smaller than usual. Notably it includes the fix for the unix 2024-05-23 12:49:37 -07:00
nfc
ntb
nubus
nvdimm virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
nvme
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf arm64 fixes for -rc1 2024-05-23 12:09:22 -07:00
phy
pinctrl - New Device Support 2024-05-22 10:41:14 -07:00
platform Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
pmdomain
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: Fixes for v6.10 2024-05-23 13:39:42 -07:00
remoteproc remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing 2024-06-28 11:56:24 -06:00
reset
rpmsg virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
rtc
s390
sbus
scsi virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
sh
siox
slimbus
soc Merge branch '20240622-qcom-pd-mapper-v9-0-a84ee3591c8e@linaro.org' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into rproc-next 2024-06-25 07:37:18 -07:00
soundwire
spi
spmi
ssb
staging Staging driver changes for 6.10-rc1 2024-05-22 12:11:48 -07:00
target
tc
tee
thermal tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
thunderbolt
tty TTY/Serial fixes for 6.10-rc1 2024-05-24 08:38:28 -07:00
ufs
uio
usb tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
vdpa Merge tag 'stable/vduse-virtio-net' into vhost 2024-05-22 08:32:48 -04:00
vfio
vhost virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
video - Fix-ups 2024-05-22 10:45:12 -07:00
virt
virtio virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
w1
watchdog
xen xen: branch for v6.10-rc1 2024-05-24 10:24:49 -07:00
zorro
Kconfig
Makefile