提交 a8c7687b 编写于 作者: S Sjur Brændeland 提交者: Rusty Russell

caif_virtio: Check that vringh_config is not null

Check that vringh_config is not NULL before using it.
Signed-off-by: NSjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 b2273be8
......@@ -670,6 +670,10 @@ static int cfv_probe(struct virtio_device *vdev)
spin_lock_init(&cfv->tx_lock);
/* Get the RX virtio ring. This is a "host side vring". */
err = -ENODEV;
if (!vdev->vringh_config || !vdev->vringh_config->find_vrhs)
goto err;
err = vdev->vringh_config->find_vrhs(vdev, 1, &cfv->vr_rx, &vrh_cbs);
if (err)
goto err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册