From: Greg KH <gregkh@linuxfoundation.org>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: jirislaby@kernel.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty/serial: Check for null pointer after calling devm_ioremap
Date: Thu, 6 Jan 2022 16:01:20 +0100 [thread overview]
Message-ID: <YdcEQPS30BHTPQJo@kroah.com> (raw)
In-Reply-To: <20220106090631.2714586-1-jiasheng@iscas.ac.cn>
On Thu, Jan 06, 2022 at 05:06:31PM +0800, Jiasheng Jiang wrote:
> As the possible failure of the allocation, the devm_ioremap() may return
> NULL pointer.
I do not understand this sentence.
> And the 'port->membase' will be directly used in mlb_usio_startup().
This does not make sense either.
> Therefore, in order to avoid the dereference of the NULL pointer, it
> should be better to add the sanity check.
What do you mean by "sanity check"?
confused,
greg k-h
prev parent reply other threads:[~2022-01-06 15:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 9:06 Jiasheng Jiang
2022-01-06 15:01 ` Greg KH [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=YdcEQPS30BHTPQJo@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jiasheng@iscas.ac.cn \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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
Powered by JetHome