thunderbolt: Call tb_switch_put() once DisplayPort bandwidth request is finished
authorGil Fine <gil.fine@linux.intel.com>
Thu, 10 Aug 2023 20:18:25 +0000 (23:18 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 5 Oct 2023 09:06:50 +0000 (12:06 +0300)
commitec4405ed92036f5bb487b5c2f9a28f9e36a3e3d5
tree4c64677bc3822de59dcc6695ea2a9bfca0c84539
parent8a749fd1a8720d4619c91c8b6e7528c0a355c0aa
thunderbolt: Call tb_switch_put() once DisplayPort bandwidth request is finished

When handling DisplayPort bandwidth request tb_switch_find_by_route() is
called and it returns a router structure with reference count increased.
In order to avoid resource leak call tb_switch_put() when finished.

Fixes: 6ce3563520be ("thunderbolt: Add support for DisplayPort bandwidth allocation mode")
Cc: stable@vger.kernel.org
Signed-off-by: Gil Fine <gil.fine@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/tb.c