lkml.org 
[lkml]   [2016]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/3] net: cavium: liquidio: Return correct error code
From
From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Date: Thu, 4 Feb 2016 19:25:13 +0530

> The return value of vmalloc 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 of the containing function checks whether the
> returned value is -1, so this check is changed as well. The single call
> site of this call site, however, only checks whether the value is not 0,
> so no further change was required.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

Applied.

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