efi: serial: Use correct EFI status type
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 11 Aug 2025 12:05:15 +0000 (13:05 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 30 Aug 2025 18:45:33 +0000 (20:45 +0200)
int is not sufficient to hold and test the return from an EFI function
call. Use efi_status_t instead so that the test can work as expected.

This issue was found by Smatch.

Fixes: 275854baeeec ("efi: Add a serial driver")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
drivers/serial/serial_efi.c

index 5733eaa..d3cd4de 100644 (file)
@@ -33,7 +33,7 @@ int serial_efi_setbrg(struct udevice *dev, int baudrate)
 
 static int serial_efi_get_key(struct serial_efi_priv *priv)
 {
-       int ret;
+       efi_status_t ret;
 
        if (priv->have_key)
                return 0;