USB: u_serial: Don't free usb_requests in gs_close and reuse them

Commit: 950a3a3 "USB: Gadget: u_serial: Freeing usb requests as a
part of gs_close" results in freeing requests and flushing the EP
on every port close even if USB connection is present. These requests
are allocated again on port open. Also, EP flush call may result in
unclocked access of USB hardware if USB BUS state was suspended at
the time of port_close. This patch fixes that and also addresses the
original issue of gs_open allocating usb requests on every port_open
by adding a condition to allocate USB requests in port open only if
they are not already allocated.

CRs-fixed: 591617
Change-Id: If2ab31fa1d36ea6119dc0ced13ade5ed93d85d86
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
thermal: qpnp-adc-tm: Fix format specifier in snprintf

Add format specifier in snprintf to avoid security
vulnerability issues.

CRs-fixed: 562261
Change-Id: I6ea67633348341267e0646912a6b428709410c78
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
diag: dci: Safeguard to prevent Integer Underflow and Memory Leak

At certain point in diag driver there can be integer underflow
thus can lead to memory leak. Added a safeguard for that.

Change-Id: I2a0304f5b9888fe12ca9ef5fbaa9a68ee4ab9c15
Crs-fixed: 556860
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Merge "USB: u_serial: Don't free usb_requests in gs_close and reuse them"
Merge "diag: dci: Safeguard to prevent Integer Underflow and Memory Leak"
Merge "thermal: qpnp-adc-tm: Fix format specifier in snprintf"
thermal: qpnp-adc-tm: Fix format specifier in snprintf

Add format specifier in snprintf to avoid security
vulnerability issues.

CRs-fixed: 562261
Change-Id: I6ea67633348341267e0646912a6b428709410c78
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
diag: dci: Safeguard to prevent Integer Underflow and Memory Leak

At certain point in diag driver there can be integer underflow
thus can lead to memory leak. Added a safeguard for that.

Change-Id: I2a0304f5b9888fe12ca9ef5fbaa9a68ee4ab9c15
Crs-fixed: 556860
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Merge "thermal: qpnp-adc-tm: Fix format specifier in snprintf"
Merge "diag: dci: Safeguard to prevent Integer Underflow and Memory Leak"