Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333299

Re: [PATCH 3/3] net: mvpp2: Return correct error codes

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] net: mvpp2: Return correct error codes
Date 2016-02-13 12:00 +0100
Message-ID <r1G5J-3Bz-15@gated-at.bofh.it> (permalink)
References <qYsBY-W2-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Date: Thu, 4 Feb 2016 19:25:26 +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:
 ...
> This function may also return -1 after calling mpp2_prs_tcam_port_map_get.
> So that the function consistently returns meaningful error values on 
> failure, the -1 is changed to -EINVAL.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

Applied.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 3/3] net: mvpp2: Return correct error codes David Miller <davem@davemloft.net> - 2016-02-13 12:00 +0100

csiph-web