[PATCH] bochs-display: Modify mismatched return value

jianchunfu posted 1 patch 3 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220914073413.5059-1-jianchunfu@cmss.chinamobile.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
hw/display/bochs-display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] bochs-display: Modify mismatched return value
Posted by jianchunfu 3 years, 4 months ago
Modify the return value of unsigned int to 0.

Signed-off-by: jianchunfu <jianchunfu@cmss.chinamobile.com>
---
 hw/display/bochs-display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index 8ed734b195..3bd22b4ea7 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -83,7 +83,7 @@ static uint64_t bochs_display_vbe_read(void *ptr, hwaddr addr,
     }
 
     if (index >= ARRAY_SIZE(s->vbe_regs)) {
-        return -1;
+        return 0;
     }
     return s->vbe_regs[index];
 }
-- 
2.18.4