summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2022-04-29 17:10:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-15 12:17:03 +0200
commit6d7ccbb0d940f526716210c6c3af37bb51d07b0d (patch)
tree40cb11f90f5d3e4e4d5d8a0c558b8a40f7b4c9c8
parentc8ae6a18708f260ccdeef6ba53af7548457dc26c (diff)
downloadlinux-stable-6d7ccbb0d940f526716210c6c3af37bb51d07b0d.tar.gz
linux-stable-6d7ccbb0d940f526716210c6c3af37bb51d07b0d.tar.bz2
linux-stable-6d7ccbb0d940f526716210c6c3af37bb51d07b0d.zip
thunderbolt: Use the actual buffer in tb_async_error()
commit eb100b8fa8e8b59eb3e5fc7a5fd4a1e3c5950f64 upstream. The received notification packet is held in pkg->buffer and not in pkg itself. Fix this by using the correct buffer. Fixes: 81a54b5e1986 ("thunderbolt: Let the connection manager handle all notifications") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/thunderbolt/ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index 37a7f4c735d0..dcdfd3767a48 100644
--- a/drivers/thunderbolt/ctl.c
+++ b/drivers/thunderbolt/ctl.c
@@ -387,7 +387,7 @@ static void tb_ctl_rx_submit(struct ctl_pkg *pkg)
static int tb_async_error(const struct ctl_pkg *pkg)
{
- const struct cfg_error_pkg *error = (const struct cfg_error_pkg *)pkg;
+ const struct cfg_error_pkg *error = pkg->buffer;
if (pkg->frame.eof != TB_CFG_PKG_ERROR)
return false;