mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
coresight: byte-cnter: Add ETR status check in bypass notifier
It is possible that notify call is called after etr is disabled or after mode switch from usb to etr. Add etr status check to avoid exception. Change-Id: I65e81e5ec01ebb3747936cdd81f886632c5419f1 Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
This commit is contained in:
parent
063759141a
commit
89ac6c47b8
1 changed files with 7 additions and 0 deletions
|
|
@ -517,6 +517,13 @@ void usb_bypass_notifier(void *priv, unsigned int event,
|
|||
if (!drvdata)
|
||||
return;
|
||||
|
||||
if (tmcdrvdata->out_mode != TMC_ETR_OUT_MODE_USB
|
||||
|| tmcdrvdata->mode == CS_MODE_DISABLED) {
|
||||
dev_err(&tmcdrvdata->csdev->dev,
|
||||
"%s: ETR is not USB mode, or ETR is disabled.\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event) {
|
||||
case USB_QDSS_CONNECT:
|
||||
usb_qdss_alloc_req(ch, USB_BUF_NUM);
|
||||
|
|
|
|||
Loading…
Reference in a new issue