mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-07 11:50:24 +00:00
parent
ffdd49f9ce
commit
78ab3c8db5
@ -30,6 +30,9 @@ void *kmalloc(size_t size, gfp_t flags)
|
|||||||
? Lx::Malloc::dma().alloc(size)
|
? Lx::Malloc::dma().alloc(size)
|
||||||
: Lx::Malloc::mem().alloc(size);
|
: Lx::Malloc::mem().alloc(size);
|
||||||
|
|
||||||
|
if (!addr)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if ((Genode::addr_t)addr & 0x3)
|
if ((Genode::addr_t)addr & 0x3)
|
||||||
Genode::error("unaligned kmalloc ", (Genode::addr_t)addr);
|
Genode::error("unaligned kmalloc ", (Genode::addr_t)addr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user