summaryrefslogtreecommitdiffstats
path: root/drivers/net/caif/caif_virtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/caif/caif_virtio.c')
-rw-r--r--drivers/net/caif/caif_virtio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 316b184ea130..0e3bede8b8a8 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -424,8 +424,10 @@ static int cfv_create_genpool(struct cfv_info *cfv)
cfv->reserved_size = num_possible_cpus() * cfv->ndev->mtu;
cfv->reserved_mem = gen_pool_alloc(cfv->genpool,
cfv->reserved_size);
- if (!cfv->reserved_mem)
+ if (!cfv->reserved_mem) {
+ err = -ENOMEM;
goto err;
+ }
cfv->watermark_tx = virtqueue_get_vring_size(cfv->vq_tx);
return 0;