summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/remoteproc_virtio.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-04-25 10:25:02 +0200
committerIngo Molnar <mingo@kernel.org>2020-04-25 10:25:02 +0200
commit4353dd3b70783ebbc83fcf12d9c0af3fbab0223b (patch)
treeaa84823fc1d4edfb4a9bbbe8bb6c2c9ea07939aa /drivers/remoteproc/remoteproc_virtio.c
parent594e576d4b93b8cda3247542366b47e1b2ddc4dc (diff)
parent4eb8320bd1aaa7e69d039f2c251735e3ef0b9a38 (diff)
Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core
Pull EFI changes for v5.8 from Ard Biesheuvel: "- preliminary changes for RISC-V - add support for setting the resolution on the EFI framebuffer - simplify kernel image loading for arm64 - Move .bss into .data via the linker script instead of relying on symbol annotations. - Get rid of __pure getters to access global variables - Clean up the config table matching arrays" Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_virtio.c')
-rw-r--r--drivers/remoteproc/remoteproc_virtio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
index 8c07cb2ca8ba..e61d738d9b47 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -320,6 +320,7 @@ static void rproc_virtio_dev_release(struct device *dev)
/**
* rproc_add_virtio_dev() - register an rproc-induced virtio device
* @rvdev: the remote vdev
+ * @id: the device type identification (used to match it with a driver).
*
* This function registers a virtio device. This vdev's partent is
* the rproc device.
@@ -334,6 +335,13 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
struct rproc_mem_entry *mem;
int ret;
+ if (rproc->ops->kick == NULL) {
+ ret = -EINVAL;
+ dev_err(dev, ".kick method not defined for %s",
+ rproc->name);
+ goto out;
+ }
+
/* Try to find dedicated vdev buffer carveout */
mem = rproc_find_carveout_by_name(rproc, "vdev%dbuffer", rvdev->index);
if (mem) {