Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2749019 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Close MD session when switching to USB Mode"

parents dd0af8d2 17a5df03
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1340,6 +1340,7 @@ static int diag_md_session_check(int curr_mode, int req_mode,
				 uint8_t *change_mode)
{
	int err = 0;
	struct diag_md_session_t *session_info = NULL;

	if (!param || !change_mode)
		return -EIO;
@@ -1404,7 +1405,9 @@ static int diag_md_session_check(int curr_mode, int req_mode,
					 "another instance running\n");
				*change_mode = 0;
				return -EINVAL;
			} else
			}
			session_info = diag_md_session_get_pid(current->tgid);
			diag_md_session_close(session_info);
			return 0;
		}