netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: festevam@gmail.com
Cc: linux@arm.linux.org.uk, B38611@freescale.com,
	netdev@vger.kernel.org, fabio.estevam@freescale.com
Subject: Re: [PATCH net-next 0/3] fec: Do not use NULL pointer to indicate error
Date: Tue, 02 Sep 2014 13:48:49 -0700 (PDT)	[thread overview]
Message-ID: <20140902.134849.506263512436464245.davem@davemloft.net> (raw)
In-Reply-To: <1409620375-20284-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <festevam@gmail.com>
Date: Mon,  1 Sep 2014 22:12:52 -0300

> Using IS_ERR() to indicate error can simplify the code a bit, so let's use
> it when appropriate.

I would rather you not do this.

Generally speaking we should not leave pointer error values in
structure pointers.

It's just asking for someone to later accidently kfree or
release the "object" because pointer errors evaluate to
non-NULL.

      parent reply	other threads:[~2014-09-02 20:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  1:12 [PATCH net-next 0/3] fec: Do not use NULL pointer to indicate error Fabio Estevam
2014-09-02  1:12 ` [PATCH net-next 1/3] fec: Do not set fep->clk_ptp to NULL on error Fabio Estevam
2014-09-02  1:12 ` [PATCH net-next 2/3] fec: Do not set fep->clk_enet_out " Fabio Estevam
2014-09-02  1:12 ` [PATCH net-next 3/3] fec: Do not set fep->reg_phy " Fabio Estevam
2014-09-02  1:37 ` [PATCH net-next 0/3] fec: Do not use NULL pointer to indicate error fugang.duan
2014-09-02 20:48 ` 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=20140902.134849.506263512436464245.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=B38611@freescale.com \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=linux@arm.linux.org.uk \
    --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).