Re: [PATCH] bonding: Return correct error code

From: David Miller
Date: Thu Feb 11 2016 - 09:44:23 EST


From: Amitoj Kaur Chawla <amitoj1606@xxxxxxxxx>
Date: Sun, 7 Feb 2016 10:56:25 +0530

> 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:
...
> The single call site only checks that the return value is not 0,
> hence no change is required at the call site.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@xxxxxxxxx>

Applied, thanks.