Skip to content
Commit 856a0a6e authored by Wen Yang's avatar Wen Yang Committed by Enric Balletbo i Serra
Browse files

platform/chrome: wilco_ec: fix use after free issue



This is caused by dereferencing 'dev_data' after put_device() in
the telem_device_remove() function.
This patch just moves the put_device() down a bit to avoid this
issue.

Fixes: 1210d1e6 ("platform/chrome: wilco_ec: Add telemetry char device interface")
Signed-off-by: default avatarWen Yang <wenyang@linux.alibaba.com>
Cc: Benson Leung <bleung@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Nick Crews <ncrews@chromium.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 74c166b5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment