diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 889a32dd21e7..f8290a577b2b 100644 --- a/drivers/thunderbolt/ctl.c +++ b/drivers/thunderbolt/ctl.c @@ -520,6 +520,10 @@ err: void tb_ctl_free(struct tb_ctl *ctl) { int i; + + if (!ctl) + return; + if (ctl->rx) ring_free(ctl->rx); if (ctl->tx)