netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: amitoj1606@gmail.com
Cc: jreuter@yaina.de, linux-hams@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	julia.lawall@lip6.fr
Subject: Re: [PATCH] dmascc: Return correct error codes
Date: Tue, 16 Feb 2016 15:33:01 -0500 (EST)	[thread overview]
Message-ID: <20160216.153301.170926451372426076.davem@davemloft.net> (raw)
In-Reply-To: <20160209184236.GA23644@amitoj-Inspiron-3542>

From: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Date: Wed, 10 Feb 2016 00:12:36 +0530

> This change has been made with the goal that kernel functions should
> return something more descriptive than -1 on failure.
> 
> A variable `err` has been introduced for storing error codes.
> 
> The return value of kzalloc on failure should return a -1 and not a
> -ENOMEM. This was found using Coccinelle. A simplified version of
> the semantic patch used is:
 ...
> Furthermore, set `err` to -ENOMEM on failure of alloc_netdev(), and to
> -ENODEV on failure of register_netdev() and probe_irq_off().
> 
> 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 to net-next, thanks.

      reply	other threads:[~2016-02-16 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 18:42 [PATCH] dmascc: Return correct error codes Amitoj Kaur Chawla
2016-02-16 20:33 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160216.153301.170926451372426076.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=amitoj1606@gmail.com \
    --cc=jreuter@yaina.de \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).