mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "usb: gadget: gsi: Avoid accessing an uninitialized variable"
This commit is contained in:
commit
149a269cff
1 changed files with 4 additions and 4 deletions
|
|
@ -207,11 +207,11 @@ static struct f_gsi *get_connected_gsi(void)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < IPA_USB_MAX_TETH_PROT_SIZE; i++) {
|
||||
if (inst_status[i].opts)
|
||||
if (inst_status[i].opts) {
|
||||
connected_gsi = inst_status[i].opts->gsi;
|
||||
|
||||
if (connected_gsi && atomic_read(&connected_gsi->connected))
|
||||
return connected_gsi;
|
||||
if (connected_gsi && atomic_read(&connected_gsi->connected))
|
||||
return connected_gsi;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue