mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-07-25 16:19:48 +02:00
caif_virtio: fix wrong pointer check in cfv_probe()
[ Upstream commita466fd7e9f] 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:0d2e1a2926("caif_virtio: Introduce caif over virtio") Signed-off-by: Vitaliy Shevtsov <v.shevtsov@mt-integration.ru> Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com> Link: https://patch.msgid.link/20250227184716.4715-1-v.shevtsov@mt-integration.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
455217ac9d
commit
8e4e08ca4c
@@ -744,7 +744,7 @@ err:
|
||||
|
||||
if (cfv->vr_rx)
|
||||
vdev->vringh_config->del_vrhs(cfv->vdev);
|
||||
if (cfv->vdev)
|
||||
if (cfv->vq_tx)
|
||||
vdev->config->del_vqs(cfv->vdev);
|
||||
free_netdev(netdev);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user