From e89dbeb52882656006c97710884eb171b2cdf2bc Mon Sep 17 00:00:00 2001 From: Tammy Leino Date: Wed, 13 Apr 2022 07:51:14 -0700 Subject: [PATCH] remoteproc_virtio_notify could use null notify operation remoteproc_virtio_notify updated to check notify operation before invoking. Signed-off-by: Tammy Leino --- lib/remoteproc/remoteproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/remoteproc/remoteproc.c b/lib/remoteproc/remoteproc.c index 25505c5f0..ba458bbe9 100644 --- a/lib/remoteproc/remoteproc.c +++ b/lib/remoteproc/remoteproc.c @@ -874,7 +874,10 @@ static int remoteproc_virtio_notify(void *priv, uint32_t id) { struct remoteproc *rproc = priv; - return rproc->ops->notify(rproc, id); + if (rproc->ops->notify) + return rproc->ops->notify(rproc, id); + + return 0; } struct virtio_device *