From: David Miller <davem@davemloft.net>
To: christophe.jaillet@wanadoo.fr
Cc: chunkeey@googlemail.com, jarod@redhat.com, ivan@de.ibm.com,
ebiggers@google.com, tklauser@distanz.ch, tremyfr@gmail.com,
robh@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] net: ibm: emac: Fix some error handling path in 'emac_probe()'
Date: Sun, 20 Aug 2017 19:53:20 -0700 (PDT) [thread overview]
Message-ID: <20170820.195320.1737734418974269546.davem@davemloft.net> (raw)
In-Reply-To: <20170820043500.24864-1-christophe.jaillet@wanadoo.fr>
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sun, 20 Aug 2017 06:35:00 +0200
> If 'irq_of_parse_and_map()' or 'of_address_to_resource()' fail, 'err' is
> known to be 0 at this point.
> So return -ENODEV instead in the first case and use 'of_iomap()' instead of
> the equivalent 'of_address_to_resource()/ioremap()' combinaison in the 2nd
> case.
>
> Doing so, the 'rsrc_regs' field of the 'emac_instance struct' becomes
> redundant and is removed.
>
> While at it, turn a 'err != 0' test into an equivalent 'err' to be more
> consistent.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> v2: use of_iomap() to simplify code
> remove 'rsrc_regs' field of the 'emac_instance struct'
> update comment
Applied to net-next.
prev parent reply other threads:[~2017-08-21 2:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-20 4:35 [PATCH v2] net: ibm: emac: Fix some error handling path in 'emac_probe()' Christophe JAILLET
2017-08-21 2:53 ` 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=20170820.195320.1737734418974269546.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=christophe.jaillet@wanadoo.fr \
--cc=chunkeey@googlemail.com \
--cc=ebiggers@google.com \
--cc=ivan@de.ibm.com \
--cc=jarod@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tklauser@distanz.ch \
--cc=tremyfr@gmail.com \
/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).