<div dir="ltr"><div><div><div><div><div>Hi<br></div><br>How to check for the error values for kernel API&#39;s like kmalloc() and ioremap().<br></div><br>If the call fails, the return value is NULL. So, how do I know what caused the failure? I have looked at examples in the kernel code. They are returning a hard-coded value of -ENOMEM if kmalloc() fails.<br><br></div>Is there a way?<br></div><div><br></div>Regards,<br></div>Manty<br></div>