]> git.sur5r.net Git - u-boot/blobdiff - lib/efi_selftest/efi_selftest_tpl.c
efi_selftest: avoid dereferencing NULL in tpl test
[u-boot] / lib / efi_selftest / efi_selftest_tpl.c
index 0b78ee759568b7e90b5a32ce449dc412d88b76eb..b8c0e70262dbe196068f688a53052b84f952e21b 100644 (file)
@@ -26,7 +26,8 @@ static void EFIAPI notify(struct efi_event *event, void *context)
 {
        unsigned int *count = context;
 
-       ++*count;
+       if (count)
+               ++*count;
 }
 
 /*