diff options
author | Marvin Borner | 2021-02-07 00:54:21 +0100 |
---|---|---|
committer | Marvin Borner | 2021-02-07 00:54:21 +0100 |
commit | e5086811a048120d51add9bff9ba7a669fb582f5 (patch) | |
tree | 8ccf3b193df5213548fc36c88ab83ac99d5e8654 /kernel/drivers/mouse.c | |
parent | 6944f48d30a581d437bc2c8f873a499291412bb7 (diff) |
Fixed some memory leaks (broke some stuff too)
Diffstat (limited to 'kernel/drivers/mouse.c')
-rw-r--r-- | kernel/drivers/mouse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/drivers/mouse.c b/kernel/drivers/mouse.c index 99fb80b..2e9ceae 100644 --- a/kernel/drivers/mouse.c +++ b/kernel/drivers/mouse.c @@ -82,16 +82,16 @@ u8 mouse_serial_read(void) return inb(0x60); } -u32 mouse_ready(void) +u8 mouse_ready(void) { return !stack_empty(queue); } -u32 mouse_read(void *buf, u32 offset, u32 count, struct device *dev) +s32 mouse_read(void *buf, u32 offset, u32 count, struct device *dev) { (void)dev; if (stack_empty(queue)) - return 0; + return -1; struct event *e = stack_pop(queue); memcpy(buf, (u8 *)e + offset, count); |