lkml.org 
[lkml]   [2016]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] bonding: Return correct error code
From
From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
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@gmail.com>

Applied, thanks.

\
 
 \ /
  Last update: 2016-02-11 16:21    [W:0.047 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site