Tag: 6d9b6f424d0806e2a7f3e7f0a74170ec3ad30443

bonding: Return correct error code

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> The return value of kzalloc on failure of allocation of memory should be -ENOMEM and not -1. Found using Coccinelle. A simplified version of the semantic patch used is: // @@ expression *e; @@ e = kzalloc(…); if (e == NULL) { … return – -1 + -ENOMEM ; } …

Continue reading