diff options
| author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-04-29 17:10:17 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-08 12:28:05 +0200 |
| commit | 23987d01de44507f2e322dcfc154fd64f2238927 (patch) | |
| tree | a48f2691f21ebadd9c43b8f89d2c30d6c1e025e9 /drivers | |
| parent | e31db376f6d1863c76eb1c81191b0845607720e4 (diff) | |
| download | linux-23987d01de44507f2e322dcfc154fd64f2238927.tar.gz linux-23987d01de44507f2e322dcfc154fd64f2238927.tar.bz2 linux-23987d01de44507f2e322dcfc154fd64f2238927.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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/thunderbolt/ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 0fb5e04191e2..409ee1551a7c 100644 --- a/drivers/thunderbolt/ctl.c +++ b/drivers/thunderbolt/ctl.c @@ -408,7 +408,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; |
