mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
coresight: byte-cntr: Add ETR status check in bypass notifier
Add ETR status check while receiving USB_QDSS_CONNECT event. Otherwise, there will cause crash due to NULL pointer issue. Since ETR buffer will be released if ETR is disabled. Change-Id: I358d25477c938844df5bff5c29ddbee307b770e3 Signed-off-by: Tao Zhang <taozha@codeaurora.org>
This commit is contained in:
parent
317d25c757
commit
e97e4f01dd
1 changed files with 5 additions and 0 deletions
|
|
@ -630,6 +630,11 @@ void usb_bypass_notifier(void *priv, unsigned int event,
|
|||
|
||||
switch (event) {
|
||||
case USB_QDSS_CONNECT:
|
||||
if (tmcdrvdata->mode == CS_MODE_DISABLED) {
|
||||
dev_err_ratelimited(&tmcdrvdata->csdev->dev,
|
||||
"%s: ETR is disabled.\n", __func__);
|
||||
return;
|
||||
}
|
||||
ret = usb_bypass_start(drvdata);
|
||||
if (ret < 0)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue