Skip to content
Snippets Groups Projects
Commit a466fd7e authored by Vitaliy Shevtsov's avatar Vitaliy Shevtsov Committed by Jakub Kicinski
Browse files

caif_virtio: fix wrong pointer check in cfv_probe()


del_vqs() frees virtqueues, therefore cfv->vq_tx pointer should be checked
for NULL before calling it, not cfv->vdev. Also the current implementation
is redundant because the pointer cfv->vdev is dereferenced before it is
checked for NULL.

Fix this by checking cfv->vq_tx for NULL instead of cfv->vdev before
calling del_vqs().

Fixes: 0d2e1a29 ("caif_virtio: Introduce caif over virtio")
Signed-off-by: default avatarVitaliy Shevtsov <v.shevtsov@mt-integration.ru>
Reviewed-by: default avatarGerhard Engleder <gerhard@engleder-embedded.com>
Link: https://patch.msgid.link/20250227184716.4715-1-v.shevtsov@mt-integration.ru


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ee01b2f2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment