From: Vincent ABRIOU <vincent.abriou@st.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>,
"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
"airlied@linux.ie" <airlied@linux.ie>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [v1] gpu: drm: sti: sti_vtac:- Handle return NULL error from devm_ioremap_nocache
Date: Wed, 4 Jan 2017 09:31:40 +0000 [thread overview]
Message-ID: <1e787556-a90a-5ccf-29b8-e791f4063ebf@st.com> (raw)
In-Reply-To: <1482297755-4620-1-git-send-email-arvind.yadav.cs@gmail.com>
Hi Arvind,
Thank for this patch.
Since sti_vtac.c file is deprecated, I rather suppress the sti_vtac.c file.
I just push a new patch to suppress it.
Thank for pointing this out.
Br
Vincent
On 12/21/2016 06:22 AM, Arvind Yadav wrote:
> Here, If devm_ioremap_nocache will fail. It will return NULL.
> Kernel can run into a NULL-pointer dereference. This error check
> will avoid NULL pointer dereference.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/gpu/drm/sti/sti_vtac.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_vtac.c b/drivers/gpu/drm/sti/sti_vtac.c
> index cf7fe8a..dd749e9 100644
> --- a/drivers/gpu/drm/sti/sti_vtac.c
> +++ b/drivers/gpu/drm/sti/sti_vtac.c
> @@ -191,6 +191,10 @@ static int sti_vtac_probe(struct platform_device *pdev)
> if (res) {
> vtac->phy_regs = devm_ioremap_nocache(dev, res->start,
> resource_size(res));
> + if (!vtac->phy_regs) {
> + DRM_ERROR("failed to remap I/O memory\n");
> + return -ENOMEM;
> + }
> sti_vtac_tx_set_config(vtac);
> } else {
>
>
prev parent reply other threads:[~2017-01-04 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 5:22 Arvind Yadav
2017-01-04 9:31 ` Vincent ABRIOU [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=1e787556-a90a-5ccf-29b8-e791f4063ebf@st.com \
--to=vincent.abriou@st.com \
--cc=airlied@linux.ie \
--cc=arvind.yadav.cs@gmail.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®