Re: [PATCH 1/3] net: cavium: liquidio: Return correct error code

2016-02-13 Thread David Miller
From: Amitoj Kaur Chawla 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

[PATCH 1/3] net: cavium: liquidio: Return correct error code

2016-02-04 Thread Amitoj Kaur Chawla
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: // @@ expression *e; identifier l1; position p,q; @@ e@q = vmalloc(...); if@p (e == NULL) { ... goto l1; } l1: ... return -1 +