]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/gadget/function/fsl_updater.c
ENGR00217717 mfgtool firmware will crash during mfgtool running
[karo-tx-linux.git] / drivers / usb / gadget / function / fsl_updater.c
index 8b4af624ba8391f53b35a538c1ed023b29ca61b0..72c14ba03ace2b77dd12c0a9d1efd1c5c40e8969 100644 (file)
@@ -70,9 +70,11 @@ static u32 count_list(struct list_head *l)
        u32 count = 0;
        struct list_head *tmp;
 
+       mutex_lock(&utp_context.lock);
        list_for_each(tmp, l) {
                count++;
        }
+       mutex_unlock(&utp_context.lock);
 
        return count;
 }