Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
	linux-serial@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>,
	Vinod Koul <vkoul@kernel.org>, Jiri Slaby <jslaby@suse.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	linux-tegra <linux-tegra@vger.kernel.org>,
	jirislaby@kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	ldewangan@nvidia.com, Thierry Reding <thierry.reding@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>, Qian Cai <cai@lca.pw>,
	lkft-triage@lists.linaro.org
Subject: Re: [qemu] boot failed: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Date: Mon, 6 Jul 2020 08:26:56 -0700	[thread overview]
Message-ID: <ea69a0f8-af48-45a3-7969-c38e0f785599@intel.com> (raw)
In-Reply-To: <CAK8P3a2LmUVj-yhwxXeCpqdxqJpp0m-q9q9SKQpfh3tFgMXPQA@mail.gmail.com>



On 7/6/2020 8:24 AM, Arnd Bergmann wrote:
> On Mon, Jul 6, 2020 at 5:01 PM Dave Jiang <dave.jiang@intel.com> wrote:
>> On 7/6/2020 5:53 AM, Arnd Bergmann wrote:
>>> On Mon, Jul 6, 2020 at 1:03 PM Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>>
>> Arnd,
>> I'm looking at the pl001_dma_probe(), I think we could make it more robust if it
>> uses IS_ERR_OR_NULL(chan) instead of IS_ERR(). Should I send a patch for it? I
>> suppose looking at the comment header for dma_request_chan() it does say return
>> chan ptr or error ptr. Sorry I missed that.
> 
> No. IS_ERR_OR_NULL() is almost always a mistake. A function should either
> return NULL on error, or it should return an error code, but should not be
> able to return either.

Fair enough.

> 
> Have you checked all the other 'return NULL' statements in your patch to
> ensure that they never return error pointers?

Yeah I looked over the rest of them. The ones that are returning NULL as far as 
I can tell are expected to return NULL.

> 
>         Arnd
> 

  reply	other threads:[~2020-07-06 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 11:03 [qemu] boot failed: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Naresh Kamboju
2020-07-06 12:53 ` Arnd Bergmann
2020-07-06 14:33   ` Dave Jiang
2020-07-06 15:10     ` Vinod Koul
2020-07-06 15:01   ` Dave Jiang
2020-07-06 15:24     ` Arnd Bergmann
2020-07-06 15:26       ` Dave Jiang [this message]
2020-07-06 17:36     ` Naresh Kamboju

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=ea69a0f8-af48-45a3-7969-c38e0f785599@intel.com \
    --to=dave.jiang@intel.com \
    --cc=agross@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=cai@lca.pw \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=jslaby@suse.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=thierry.reding@gmail.com \
    --cc=vkoul@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