|
|
|
|
|
by whoknowsidont
699 days ago
|
|
>Returning null instead of throwing an exception when an error occurs is the quality of programming I see from junior outsourced developers. This is kernel code, most likely written in C (and regardless of language, you don't really do exceptions in the kernel at all for various reasons). Returning NULL or ERR_PTR (in the case of linux) is absolutely one of the most standard, common, and enforced ways of indicating an error state in kernel code, across many OS's. So it's no surprise to see the pattern here, as you would expect. |
|